Modified:
/branches/gcc-linux/StrongtalkSource/CodeView.dlt
/branches/gcc-linux/StrongtalkSource/OopsVMMirror.dlt
/branches/gcc-linux/build.win32/strongtalk.ncb
/branches/gcc-linux/build.win32/strongtalk.suo
/branches/gcc-linux/vm/prims/oop_prims.cpp
/branches/gcc-linux/vm/prims/oop_prims.hpp
/branches/gcc-linux/vm/prims/prims.inc
=======================================
--- /branches/gcc-linux/StrongtalkSource/CodeView.dlt Sat Nov 1 12:10:49
2008
+++ /branches/gcc-linux/StrongtalkSource/CodeView.dlt Mon Dec 28 10:39:09
2009
@@ -107,6 +107,10 @@
!
+computeValueIfSuccess: block <[X]>
+
+ block value: (self computeValueIfFail: [^self])!
+
doIt
(self buildClosureIfFail: [^self]) fork
@@ -118,9 +122,13 @@
inspectIt
- (Inspector on: (self computeValueIfFail: [^self])) launch
+ self inspectItBlock fork
!
+inspectItBlock ^ <[]>
+
+ ^[self computeValueIfSuccess: [:result | (Inspector on: result) launch]]!
+
openDefinition
| mirror <Mirror> |
@@ -133,14 +141,25 @@
showIt
- | oop <Object> pstr <Str> result <Visual> |
- oop := self computeValueIfFail: [^self].
- pstr := oop printString.
- result := (StringGlyph for: pstr painter: self showItPainter) asVisual
withBackdrop: self showItBackdrop.
- result := (PressHandler for: result) onPress: [ (Inspector on: oop)
launch ].
- result := (PopUpMenuHandler for: result) menuBlock: [ self showItMenuFor:
result text: pstr ].
- self replaceModelFrom: self selectionEnd to: self selectionEnd
withGlyphs: (Array[Array[Glyph]] with: (Array[Glyph] with: result)).
- self selection: self selectionEnd ,, self selectionEnd.
+ self showItBlock fork
+!
+
+showItBlock ^<[]>
+
+ ^[self computeValueIfSuccess: [:oop | | pstr <Str> result <Visual> |
+ pstr := oop printString.
+ result := (StringGlyph
+ for: pstr
+ painter: self showItPainter) asVisual
+ withBackdrop: self showItBackdrop.
+ result := (PressHandler for: result)
+ onPress: [ (Inspector on: oop) launch ].
+ result := (PopUpMenuHandler for: result)
+ menuBlock: [ self showItMenuFor: result text: pstr ].
+ self replaceModelFrom: self selectionEnd
+ to: self selectionEnd
+ withGlyphs: (Array[Array[Glyph]] with: (Array[Glyph] with:
result)).
+ self selection: self selectionEnd ,, self selectionEnd]]
! !
! (Delta mirrorFor: #CodeView) methodsFor: 'event processing' !
=======================================
--- /branches/gcc-linux/StrongtalkSource/OopsVMMirror.dlt Sat Dec 19
12:39:38 2009
+++ /branches/gcc-linux/StrongtalkSource/OopsVMMirror.dlt Mon Dec 28
10:39:09 2009
@@ -11,6 +11,20 @@
(c) 1995-1997 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
Use and distribution of this software is subject to the terms of the
attached source license.'!
+! (Delta mirrorFor: #OopsVMMirror) methodsFor: 'accessing' !
+
+
+instVarAt: index <SmallInt> ^ <Object>
+
+ ^self reflectee fileOutInstVarAt: index + self reflectee
fileOutHeaderSize!
+
+instVarAt: index <SmallInt> put: value <Object>
+
+ {{ primitiveInstVarOf: self reflectee
+ at: index + self reflectee fileOutHeaderSize
+ put: value
+ ifFail: [:err | self error: 'Unable to set instance variable, ', index
printString, ', of ', self reflectee printString] }}! !
+
! (Delta mirrorFor: #OopsVMMirror) methodsFor: 'iteration' !
=======================================
--- /branches/gcc-linux/build.win32/strongtalk.ncb Sat Dec 19 12:39:38 2009
+++ /branches/gcc-linux/build.win32/strongtalk.ncb Mon Dec 28 10:39:09 2009
File is too large to display a diff.
=======================================
--- /branches/gcc-linux/build.win32/strongtalk.suo Sat Dec 19 12:39:38 2009
+++ /branches/gcc-linux/build.win32/strongtalk.suo Mon Dec 28 10:39:09 2009
Binary file, no diff available.
=======================================
--- /branches/gcc-linux/vm/prims/oop_prims.cpp Mon Aug 11 12:27:00 2008
+++ /branches/gcc-linux/vm/prims/oop_prims.cpp Mon Dec 28 10:39:09 2009
@@ -86,7 +86,7 @@
int raw_index = smiOop(index)->value() - 1;
if (!memOop(receiver)->is_within_instVar_bounds(raw_index))
- markSymbol(vmSymbols::out_of_bounds());
+ return markSymbol(vmSymbols::out_of_bounds());
return memOop(receiver)->instVarAt(raw_index);
}
@@ -116,7 +116,7 @@
int raw_index = smiOop(index)->value() - 1;
if (!memOop(receiver)->is_within_instVar_bounds(raw_index))
- markSymbol(vmSymbols::out_of_bounds());
+ return markSymbol(vmSymbols::out_of_bounds());
return memOop(receiver)->instVarAtPut(raw_index, value);
}
=======================================
--- /branches/gcc-linux/vm/prims/oop_prims.hpp Thu Oct 26 09:36:34 2006
+++ /branches/gcc-linux/vm/prims/oop_prims.hpp Mon Dec 28 10:39:09 2009
@@ -55,9 +55,10 @@
static PRIM_DECL_2(instance_variable_name_at, oop obj, oop index);
//%prim
- // <Object> primitiveInstVarAt: index <SmallInteger>
- // put: contents <Object>
- // ifFail: failBlock <PrimFailBlock> ^<Object> =
+ // <NoReceiver> primitiveInstVarOf: obj <Object>
+ // at: index <SmallInteger>
+ // put: contents <Object>
+ // ifFail: failBlock <PrimFailBlock> ^<Object> =
// Internal { error = #(OutOfBounds)
// name = 'oopPrimitives::instVarAtPut' }
//%
=======================================
--- /branches/gcc-linux/vm/prims/prims.inc Sun Dec 6 13:13:11 2009
+++ /branches/gcc-linux/vm/prims/prims.inc Mon Dec 28 10:39:09 2009
@@ -2518,22 +2518,22 @@
errors_251
};
-static char* signature_252[] =
{ "Object", "Object", "SmallInteger", "Object"};
+static char* signature_252[] =
{ "Symbol", "Reciever", "Object", "SmallInteger"};
static char* errors_252[] = { "OutOfBounds", NULL};
static primitive_desc primitive_252 = {
- "primitiveInstVarAt:put:ifFail:",
- fntype(&oopPrimitives::instVarAtPut),
+ "primitiveInstVarNameFor:at:ifFail:",
+ fntype(&oopPrimitives::instance_variable_name_at),
1376259,
signature_252,
errors_252
};
-static char* signature_253[] =
{ "Symbol", "Reciever", "Object", "SmallInteger"};
+static char* signature_253[] =
{ "Object", "Object", "SmallInteger", "Object"};
static char* errors_253[] = { "OutOfBounds", NULL};
static primitive_desc primitive_253 = {
- "primitiveInstVarNameFor:at:ifFail:",
- fntype(&oopPrimitives::instance_variable_name_at),
- 1376259,
+ "primitiveInstVarOf:at:put:ifFail:",
+ fntype(&oopPrimitives::instVarAtPut),
+ 327683,
signature_253,
errors_253
};