[Vm-dev] VM Maker: VMMaker-eem.305.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 14 22:28:58 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-eem.305.mcz
==================== Summary ====================
Name: VMMaker-eem.305
Author: eem
Time: 14 March 2013, 3:27:13.396 pm
UUID: b4e16888-de79-4dcd-8cd1-a5e9f34080c0
Ancestors: VMMaker-dtl.304
Flush the AtCache if required in primitiveFlushCacheByMethod
and primitiveFlushCacheBySelector. Rename
primitiveFlushCacheSelective to
primitiveFlushCacheBySelector for consistency.
=============== Diff against VMMaker-dtl.304 ===============
Item was changed:
----- Method: Interpreter class>>initializePrimitiveTable (in category 'initialization') -----
(excessive size, no diff calculated)
Item was changed:
----- Method: Interpreter>>primitiveFlushCacheByMethod (in category 'system control primitives') -----
primitiveFlushCacheByMethod
"The receiver is a compiledMethod. Clear all entries in the method lookup cache that refer to this method, presumably because it has been redefined, overridden or removed."
| probe oldMethod |
oldMethod := self stackTop.
probe := 0.
1 to: MethodCacheEntries do:
[:i | (methodCache at: probe + MethodCacheMethod) = oldMethod ifTrue:
[methodCache at: probe + MethodCacheSelector put: 0].
probe := probe + MethodCacheEntrySize].
+ self flushAtCache.
self compilerFlushCacheHook: oldMethod. "Flush the dynamic compiler's inline caches."!
Item was added:
+ ----- Method: Interpreter>>primitiveFlushCacheBySelector (in category 'system control primitives') -----
+ primitiveFlushCacheBySelector
+ "The receiver is a message selector. Clear all entries in the method lookup cache with this selector, presumably because an associated method has been redefined."
+ | selector probe |
+ selector := self stackTop.
+ probe := 0.
+ 1 to: MethodCacheEntries do:
+ [:i | (methodCache at: probe + MethodCacheSelector) = selector ifTrue:
+ [methodCache at: probe + MethodCacheSelector put: 0].
+ probe := probe + MethodCacheEntrySize].
+ (selector = (self specialSelector: 16) "at:"
+ or: [selector = (self specialSelector: 17) "at:put:"]) ifTrue:
+ [self flushAtCache]!
Item was removed:
- ----- Method: Interpreter>>primitiveFlushCacheSelective (in category 'system control primitives') -----
- primitiveFlushCacheSelective
- "The receiver is a message selector. Clear all entries in the method lookup cache with this selector, presumably because an associated method has been redefined."
- | selector probe |
- selector := self stackTop.
- probe := 0.
- 1 to: MethodCacheEntries do:
- [:i | (methodCache at: probe + MethodCacheSelector) = selector ifTrue:
- [methodCache at: probe + MethodCacheSelector put: 0].
- probe := probe + MethodCacheEntrySize]!
More information about the Vm-dev
mailing list