help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] compiling method attributes


From: Stephen Compall
Subject: [Help-smalltalk] compiling method attributes
Date: Sat, 30 Dec 2006 22:31:31 -0600

http://scompall.nocandysw.com/gst/gst-methodAttributes-comp.diff puts in
place a simple framework for compiling attributes like <cCall:...> and
<primitive:...> in STCompiler.  It also includes some fixes for
RBMethodNode>>#start, #stop and PositionableStream>>#copyFrom:to:, as
these are necessary for stream-based compilation tests.  It assumes
compiler-cascade.diff is applied.

This does not include actual compilation of any attribute tags, but it
does parse them and warn when a given type is unimplemented.

It will probably break on filing in because FileSegment can be used for
RBMethodNode's source instvar, which doesn't support copyFrom:to:.  I am
deciding whether having RBMethodNode>>#primitiveSources extract the
source with asString on each call, saving the result in the source
instvar, or something else would be the best solution.

Quick test, with Compiler loaded:

st> [UndefinedObject compile: 'float3: a arg: b arg: c
        <cCall: ''s11_float3'' returning: #int args: #(#float #float #float)>']
      on: Warning do: [:w | w messageText displayNl. w resume]!
duplicate variable name a
duplicate variable name b
duplicate variable name c
<#cCall:returning:args:> tag not yet implemented

(Wondering what's causing the "duplicate variable name" warnings.  Oh
well, some other time, more testing)

-- 
Stephen Compall
http://scompall.nocandysw.com/blog

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]