| kind | = | "Call" |
A call is the runtime structure that includes the specific information for a call, that is available inside a DefaultMacro.
- activateValue(value, newSelf nil, +:valuesToAdd)
- activateValueWithCachedArguments(value, newSelf nil, +:valuesToAdd)
- argAt(n)
- arguments()
- currentContext()
- evaluatedArguments()
- ground()
- message()
- receiver()
- resendToMethod(cellName)
- resendToReceiver(newReceiver)
- resendToValue(value, newSelf nil)
uhm. this one isn't too bad.
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:activateValue, method)
I really ought to write documentation for these methods, but I don't know how to describe what they do.
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:activateValueWithCachedArguments, method)
evaluates and returns the argument at 'n'. this is just a short hand for 'call message evalArgAt(n, call ground)'
[ show source ]
method(n, message evalArgAt(n, ground))
- - should evaluate and return the argument at the specific place
[ show source ]
x = macro(call argAt(0)) x(23 +(44)) should ==(67)
- - should raise an error if no arg at the index specified was available
[ show source ]
x = macro(call argAt(0)) fn(x) should signal(Condition Error Index)
returns a list of all the unevaluated arguments
- - should return all arguments in a list, unevaluated
[ show source ]
x = macro(call arguments) x(foo bar, x rrr) [](0) name should ==(:foo) x(foo bar, x rrr) [](1) name should ==(:x)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:arguments)
returns the currently executing context
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:currentContext)
returns a list of the result of evaluating all the arguments to this call
- - should return a list of all the evaluated arguments
[ show source ]
x = macro(call evaluatedArguments) x(13 +(55), 18 +(18), 3 -(2)) [](0) should ==(68) x(13 +(55), 18 +(18), 3 -(2)) [](1) should ==(36) x(13 +(55), 18 +(18), 3 -(2)) [](2) should ==(1)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:evaluatedArguments)
returns the ground of the place this call originated
- - should return the surrounding context of the call
[ show source ]
x = macro(call ground) should ==(x)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:ground)
returns the message that started this call
- - should return the message used to invoke this call
[ show source ]
x = macro(call message) x name should ==(:x)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:message)
returns the receiver of the call
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:receiver)
takes one evaluated text or symbol argument and resends the current message to that method/macro on the current receiver.
- - it should resend the thing with the same arguments
[ show source ]
x = macro(call resendToMethod(:f)) f = method(a, b, c, [](a, b, c)) w = 13 x(1 +(w), w +(w), w +(3) +(w)) [](0) should ==(14) x(1 +(w), w +(w), w +(3) +(w)) [](1) should ==(26) x(1 +(w), w +(w), w +(3) +(w)) [](2) should ==(29)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:resendToMethod, :f)
takes one evaluated object and resends the current message with that object as the new receiver
- - it should resend the thing with the same arguments
[ show source ]
blarg = Origin mimic blarg2 = Origin mimic blarg x = lecro(call resendToReceiver(blarg2)) blarg2 x = method(a, b, c, [](a, b, c)) w = 13 blarg x(1 +(w), w +(w), w +(3) +(w)) [](0) should ==(14) blarg x(1 +(w), w +(w), w +(3) +(w)) [](1) should ==(26) blarg x(1 +(w), w +(w), w +(3) +(w)) [](2) should ==(29)
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:resendToReceiver, :f)
uhm. this is a strange one. really.
- - should check the receiver type and signal an appropriate condition
[ show source ]
Call should checkReceiverTypeOn(:resendToValue, method)