Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2810.mcz ==================== Summary ==================== Name: VMMaker.oscog-eem.2810 Author: eem Time: 18 September 2020, 6:27:45.474771 pm UUID: bd514bb6-2d85-4d80-96d0-27a2a422579c Ancestors: VMMaker.oscog-eem.2809 Slang: Fix reporting of deep warnings within the VMMakerTool; we need a logger. SoundPlugin: eliminate the warning that caused the crash that the above is a fix to... =============== Diff against VMMaker.oscog-eem.2809 =============== Item was added: + ----- Method: CCodeGenerator>>getLogger (in category 'initialize-release') ----- + getLogger + logger := (ProvideAnswerNotification new tag: #logger; signal) ifNil: [Transcript]! Item was changed: ----- Method: CCodeGenerator>>initialize (in category 'initialize-release') ----- initialize translationDict := Dictionary new. inlineList := Array new. constants := Dictionary new: 100. variables := Set new: 100. variableDeclarations := Dictionary new: 100. methods := Dictionary new: 500. kernelReturnTypes := self computeKernelReturnTypes. macros := Dictionary new. self initializeCTranslationDictionary. headerFiles := OrderedCollection new. globalVariableUsage := Dictionary new. useSymbolicConstants := true. generateDeadCode := true. scopeStack := OrderedCollection new. + self getLogger. - logger := (ProvideAnswerNotification new tag: #logger; signal) ifNil: [Transcript]. pools := IdentitySet new. selectorTranslations := IdentityDictionary new. suppressAsmLabels := false. previousCommentMarksInlining := false. previousCommenter := nil. breakSrcInlineSelectors := IdentitySet new. breakDestInlineSelectors := IdentitySet new! Item was changed: ----- Method: SmartSyntaxPluginTMethod>>setSelector:definingClass:args:locals:block:primitive:properties:comment: (in category 'initialization') ----- setSelector: sel definingClass: class args: argList locals: localList block: aBlockNode primitive: aNumber properties: methodProperties comment: aComment "Initialize this method using the given information." selector := sel. definingClass := class. returnType := #sqInt. "assume return type is sqInt for now" args := argList asOrderedCollection collect: [:arg | arg key]. locals := (localList collect: [:arg | arg key]) asSet. declarations := Dictionary new. primitive := aNumber. properties := methodProperties. comment := aComment. parseTree := aBlockNode asRootTranslatorNodeIn: self. labels := Set new. complete := false. "set to true when all possible inlining has been done" export := self extractExportDirective. static := self extractStaticDirective. self extractSharedCase. isPrimitive := false. "set to true only if you find a primtive direction." + self recordDeclarationsIn: CCodeGenerator basicNew getLogger. "Just for conventionalTypeForType:" - self recordDeclarationsIn: CCodeGenerator basicNew. "Just for conventionalTypeForType:" self extractPrimitiveDirectives. ! Item was changed: ----- Method: SoundPlugin>>primitiveSoundRecordSamplesInto:startingAt: (in category 'primitives') ----- primitiveSoundRecordSamplesInto: buf startingAt: startWordIndex "Record a buffer's worth of (mono?) 16-bit sound samples." | bufSizeInBytes samplesRecorded byteOffset | - <var: #bufPtr type: #'char*'> self primitive: 'primitiveSoundRecordSamples' parameters: #(WordsOrShorts SmallInteger). bufSizeInBytes := interpreterProxy byteSizeOf: buf cPtrAsOop. byteOffset := (startWordIndex - 1) * 2. (startWordIndex >= 1 and: [byteOffset < bufSizeInBytes]) ifFalse: [^interpreterProxy primitiveFailFor: PrimErrBadIndex]. samplesRecorded := self snd_RecordSamplesIntoAtLength: (self cCoerce: buf to: #'char *') + byteOffset _: 0 _: bufSizeInBytes - byteOffset. interpreterProxy failed ifFalse: [^samplesRecorded asPositiveIntegerObj]! |
Free forum by Nabble | Edit this page |