VM Maker: VMMaker.oscog-eem.2263.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2263.mcz

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2263.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2263
Author: eem
Time: 16 August 2017, 5:51:47.526756 pm
UUID: d95f8ff7-d4f0-4d22-911e-45174146c4ab
Ancestors: VMMaker.oscog-eem.2262

Fix simulation of Pharo primitiveDirectoryLookup above Squeak.

=============== Diff against VMMaker.oscog-eem.2262 ===============

Item was changed:
  ----- Method: CogVMSimulator>>primitiveDirectoryLookup (in category 'file primitives') -----
  primitiveDirectoryLookup
  | index pathName array result |
  index := self stackIntegerValue: 0.
+ pathName := self stringOf: (self stackValue: 1).
- pathName := (self stringOf: (self stackValue: 1)).
 
  self successful ifFalse:
  [^self primitiveFail].
 
  array := FileDirectory default primLookupEntryIn: pathName index: index.
 
+ array ifNil:
- array == nil ifTrue:
  [self pop: 3 thenPush: objectMemory nilObject.
+ ^array].
- ^array].
  array == #badDirectoryPath ifTrue:
+ [^self "halt" primitiveFail].
- ["self halt."
- ^self primitiveFail].
 
+ result := PharoVM
+ ifTrue: [self makeDirEntryName: (array at: 1) size: (array at: 1) size
- 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 ifAbsent: 8r664) isSymlink: (array at: 7 ifAbsent: [false]) ]
+ ifFalse: [self makeDirEntryName: (array at: 1) size: (array at: 1) size
- 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)].
- isDir: (array at: 4) fileSize: (array at: 5) ].
 
  self pop: 3 thenPush: result!

Item was changed:
  ----- Method: StackInterpreterSimulator>>primitiveDirectoryLookup (in category 'file primitives') -----
  primitiveDirectoryLookup
  | index pathName array result |
  index := self stackIntegerValue: 0.
+ pathName := self stringOf: (self stackValue: 1).
- pathName := (self stringOf: (self stackValue: 1)).
 
  self successful ifFalse:
  [^self primitiveFail].
 
  array := FileDirectory default primLookupEntryIn: pathName index: index.
 
+ array ifNil:
- array == nil ifTrue:
  [self pop: 3 thenPush: objectMemory nilObject.
+ ^array].
- ^array].
  array == #badDirectoryPath ifTrue:
+ [^self "halt" primitiveFail].
- ["self halt."
- ^self primitiveFail].
 
+ result := PharoVM
+ ifTrue: [self makeDirEntryName: (array at: 1) size: (array at: 1) size
- 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 ifAbsent: 8r664) isSymlink: (array at: 7 ifAbsent: [false]) ]
+ ifFalse: [self makeDirEntryName: (array at: 1) size: (array at: 1) size
- 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)].
+
- isDir: (array at: 4)  fileSize: (array at: 5) ].
  self pop: 3 thenPush: result!