<br><br><div class="gmail_quote">On Sat, Sep 25, 2010 at 8:27 PM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu">leves@elte.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Sun, 26 Sep 2010, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Eliot Miranda uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-eem.501.mcz" target="_blank">http://source.squeak.org/trunk/Kernel-eem.501.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-eem.501<br>
Author: eem<br>
Time: 25 September 2010, 7:55:34.708 pm<br>
UUID: 5b55eae3-594b-4416-9d47-5a4ebaabb238<br>
Ancestors: Kernel-ul.500<br>
<br>
Add mirror primitives which can be used for accurate<br>
execution simulation (a.k.a. debugging) of proxies.<br>
</blockquote>
<br>
#objectSize: seems to be missing.<br></blockquote><div><br></div><div>Superb catch. In trying to collect the mirror primitives and only the mirror primitives I stupidly did SystemNavigation new browseAllSelect: [:m| m beginsWith: 'object:'] and so missed this.</div>
<div><br></div><div>Thanks!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Levente<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
=============== Diff against Kernel-ul.500 ===============<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:basicAt: (in category 'mirror primitives') -----<br>
+ object: anObject basicAt: index<br>
+ "Answer the value of an indexable element in the argument anObject without sending<br>
+ it a message. Fail if the argument index is not an Integer or is out of bounds, or if<br>
+ anObject is not indexable. This mimics the action of the VM when it indexes an object.<br>
+ Used to simulate the execution machinery by, for example, the debugger.<br>
+ Primitive. See Object documentation whatIsAPrimitive."<br>
+<br>
+ <primitive: 60><br>
+ index isInteger ifTrue: [self errorSubscriptBounds: index].<br>
+ index isNumber<br>
+ ifTrue: [^self object: anObject basicAt: index asInteger]<br>
+ ifFalse: [self errorNonIntegerIndex]!<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:basicAt:put: (in category 'mirror primitives') -----<br>
+ object: anObject basicAt: index put: value<br>
+ "Store the last argument<br>
+ value in the indexable element of the argument anObject indicated by index without sending<br>
+ anObject a message. Fail if the argument index is not an Integer or is out of bounds, or if<br>
+ anObject is not indexable, or if value is an inappropriate value for anObject's indexable slots.<br>
+ This mimics the action of the VM when it indexes an object.<br>
+ Used to simulate the execution machinery by, for example, the debugger.<br>
+ Primitive. See Object documentation whatIsAPrimitive."<br>
+<br>
+ <primitive: 61><br>
+ index isInteger<br>
+ ifTrue: [(index >= 1 and: [index <= (self objectSize: anObject)])<br>
+ ifTrue: [self errorImproperStore]<br>
+ ifFalse: [self errorSubscriptBounds: index]].<br>
+ index isNumber<br>
+ ifTrue: [^self object: anObject basicAt: index asInteger put: value]<br>
+ ifFalse: [self errorNonIntegerIndex]!<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:eqeq: (in category 'mirror primitives') -----<br>
+ object: anObject eqeq: anOtherObject<br>
+ "Answer whether the first and second arguments are the same object (have the<br>
+ same object pointer) without sending a message to the first argument. This<br>
+ mimics the action of the VM when it compares two object pointers. Used to<br>
+ simulate the execution machinery by, for example, the debugger.<br>
+ Primitive. See Object documentation whatIsAPrimitive."<br>
+<br>
+ <primitive: 110><br>
+ self primitiveFailed!<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:instVarAt: (in category 'mirror primitives') -----<br>
+ object: anObject instVarAt: anIndex<br>
+ "Primitive. Answer a fixed variable in an object. The numbering of the<br>
+ variables corresponds to the named instance variables. Fail if the index<br>
+ is not an Integer or is not the index of a fixed variable. Essential for the<br>
+ debugger. See Object documentation whatIsAPrimitive."<br>
+<br>
+ <primitive: 73><br>
+ "Access beyond fixed variables."<br>
+ ^self object: anObject basicAt: anIndex - (self objectClass: anObject) instSize!<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:instVarAt:put: (in category 'mirror primitives') -----<br>
+ object: anObject instVarAt: anIndex put: aValue<br>
+ "Primitive. Store a value into a fixed variable in the argument anObject.<br>
+ The numbering of the variables corresponds to the named instance<br>
+ variables. Fail if the index is not an Integer or is not the index of a<br>
+ fixed variable. Answer the value stored as the result. Using this<br>
+ message violates the principle that each object has sovereign control<br>
+ over the storing of values into its instance variables. Essential for the<br>
+ debugger. See Object documentation whatIsAPrimitive."<br>
+<br>
+ <primitive: 74><br>
+ "Access beyond fixed fields"<br>
+ ^self object: anObject basicAt: anIndex - (self objectClass: anObject) instSize put: aValue!<br>
<br>
Item was added:<br>
+ ----- Method: ContextPart>>object:perform:withArguments:inClass: (in category 'mirror primitives') -----<br>
+ object: anObject perform: selector withArguments: argArray inClass: lookupClass<br>
+ "Send the selector, aSymbol, to anObject with arguments in argArray.<br>
+ Fail if the number of arguments expected by the selector<br>
+ does not match the size of argArray, or if lookupClass<br>
+ cannot be found among the anObject's superclasses.<br>
+ Primitive. Essential for the debugger."<br>
+<br>
+ <primitive: 100 error: error><br>
+ (selector isMemberOf: Symbol) ifFalse:<br>
+ [^self error: 'selector argument must be a Symbol'].<br>
+ (argArray isMemberOf: Array) ifFalse:<br>
+ [^self error: 'argArray must be an Array'].<br>
+ (selector numArgs = argArray size)<br>
+ ifFalse: [^self error: 'incorrect number of arguments'].<br>
+ ((self objectClass: anObject) == lookupClass<br>
+ or: [(self objectClass: anObject) inheritsFrom: lookupClass]) ifFalse:<br>
+ [^self error: 'lookupClass is not in anObject''s inheritance chain'].<br>
+ self primitiveFailed!<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br>