[Vm-dev] VM Maker: VMMaker.oscog-eem.1515.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Nov 13 01:36:50 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1515.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1515
Author: eem
Time: 12 November 2015, 5:34:55.49 pm
UUID: 9b821af2-6714-461b-b0b1-eb5c660f75e4
Ancestors: VMMaker.oscog-rmacnak.1514
Use the "approved" conversion method for accessing processor simulator registers in ARM division emulation.
Make simulated directory access fail correctly when a file doesn't exist.
=============== Diff against VMMaker.oscog-rmacnak.1514 ===============
Item was changed:
----- Method: CogARMCompiler>>aeabiDiv:Mod: (in category 'simulation') -----
aeabiDiv: dividend Mod: divisor
"simulate the __aeabi_idivmod call"
<doNotGenerate>
+ | proc result top bottom|
+ proc := cogit processor.
+ top := proc convertInternalToInteger: dividend.
+ bottom := proc convertInternalToInteger: divisor.
- |result top bottom|
-
- top:= dividend signedIntFromLong.
- bottom := divisor signedIntFromLong.
+ proc r0: (result := proc convertIntegerToInternal: (top quo: bottom)).
+ proc r1: (proc convertIntegerToInternal: (top rem: bottom)).
- cogit processor r0: (result :=(top quo: bottom) signedIntToLong).
- cogit processor r1: (top rem: bottom) signedIntToLong.
^result!
Item was changed:
----- Method: CogVMSimulator>>primitiveDirectoryEntry (in category 'file primitives') -----
primitiveDirectoryEntry
+ | name pathName arrayNilOrSymbol result |
- | name pathName array result |
name := self stringOf: self stackTop.
pathName := self stringOf: (self stackValue: 1).
self successful ifFalse:
[^self primitiveFail].
+ arrayNilOrSymbol := FileDirectory default primLookupEntryIn: pathName name: name.
+ arrayNilOrSymbol ifNil:
- array := FileDirectory default primLookupEntryIn: pathName name: name.
- array == nil ifTrue:
[self pop: 3 thenPush: objectMemory nilObject.
+ ^self].
+ arrayNilOrSymbol isArray ifFalse:
- ^array].
- array == #badDirectoryPath ifTrue:
[self halt.
+ ^self primitiveFail].
- ^self primitiveFail].
+ result := PharoVM
+ ifTrue:
+ [self makeDirEntryName: (arrayNilOrSymbol at: 1) size: (arrayNilOrSymbol at: 1) size
+ createDate: (arrayNilOrSymbol at: 2) modDate: (arrayNilOrSymbol at: 3)
+ isDir: (arrayNilOrSymbol at: 4) fileSize: (arrayNilOrSymbol at: 5)
+ posixPermissions: (arrayNilOrSymbol at: 6) isSymlink: (arrayNilOrSymbol at: 7) ]
+ ifFalse:
+ [self makeDirEntryName: (arrayNilOrSymbol at: 1) size: (arrayNilOrSymbol at: 1) size
+ createDate: (arrayNilOrSymbol at: 2) modDate: (arrayNilOrSymbol at: 3)
+ isDir: (arrayNilOrSymbol at: 4) fileSize: (arrayNilOrSymbol at: 5) ].
- PharoVM
- ifTrue: [
- result := self makeDirEntryName: (array at: 1) size: (array at: 1) size
- createDate: (array at: 2) modDate: (array at: 3)
- isDir: (array at: 4) fileSize: (array at: 5)
- posixPermissions: (array at: 6) isSymlink: (array at: 7) ]
- ifFalse: [
- result := self makeDirEntryName: (array at: 1) size: (array at: 1) size
- createDate: (array at: 2) modDate: (array at: 3)
- isDir: (array at: 4) fileSize: (array at: 5) ].
self pop: 3 thenPush: result!
More information about the Vm-dev
mailing list