VM Maker: FileAttributesPlugin.oscog-akg.52.mcz

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

VM Maker: FileAttributesPlugin.oscog-akg.52.mcz

commits-2
 
Alistair Grant uploaded a new version of FileAttributesPlugin to project VM Maker:
http://source.squeak.org/VMMaker/FileAttributesPlugin.oscog-akg.52.mcz

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

Name: FileAttributesPlugin.oscog-akg.52
Author: akg
Time: 2 December 2019, 7:58:15.59371 am
UUID: 0e9df6e5-98d4-4906-a58a-01faa4522382
Ancestors: FileAttributesPlugin.oscog-akg.51

Handle primitive failures when retrieving the attribute of a file in FileAttributesPluginSimulator.

=============== Diff against FileAttributesPlugin.oscog-akg.51 ===============

Item was changed:
  ----- Method: FileAttributesPluginSimulator>>faFileAttribute:_: (in category 'simulation') -----
  faFileAttribute: faPath _: attributeNumber
  "Simulate the the call by actually calling the primitive."
 
  | result |
 
  result := self primFileAttribute: (self faGetStPath: faPath) number: attributeNumber.
- result isNumber ifTrue: [interpreterProxy primitiveFailForOSError: result].
  ^self toOop: result!

Item was changed:
  ----- Method: FileAttributesPluginSimulator>>signalError:for: (in category 'primitives') -----
  signalError: error for: aByteArray
+ "In the simulation, flag the interpreter as failing and return the error code"
- "In the simulation, just return the error code"
 
  error ifNil: [ ^interpreterProxy primitiveFail ].
  error isSymbol ifTrue: [ ^interpreterProxy primitiveFailFor:
  ((SmalltalkImage current specialObjectsArray at: 52) indexOf: error) ].
  error isPrimitiveError ifFalse: [
  "We shouldn't ever get here"
  ^self primitiveFailed. ].
 
+ interpreterProxy primitiveFailForOSError: error errorCode.
  ^error errorCode.
  !