[Vm-dev] VM Maker: FileAttributesPlugin.oscog-akg.52.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 2 07:20:07 UTC 2019

Alistair Grant uploaded a new version of FileAttributesPlugin to project VM Maker:

==================== 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.

More information about the Vm-dev mailing list