-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Pedro Pinto edited this page Sep 4, 2016
·
16 revisions
#TODO
-
MonomorphicBinderfor builtins:
1.to_s
["a#@b"].inspect- Configurations:
- Compiler's default CallSiteBinder implementation.
- PolymorphicSiteBinder maximum cache size threshold.
#Notes
-
aliasandalias_methodcreate a copy of the method, instead of using the original. - Example of Regexp with
'\n'delimiter and line jump:eval("%r\n\#{<<EOS}\na\nEOS\ni")
#Parameters
call (sender):
ruby : <expr> # Required
<label>: <expr> # KeyRequired
<expr> => <expr> # KeyRequired
*<expr> # Rest
**<expr> # KeyRest
&<expr> # Block
def (receiver):
C# : <type> <name> // Required/KeyRequired
<type> <name> = <value> // Optional/KeyOptional
params <type>[] <name> // Rest
<delegate> <name> // Block (last argument or immediately before params)
ruby : <name> # Required
<name> = <expr> # Optional
<label>: # KeyRequired
<label>: <expr> # KeyOptional
*<name> # Rest
**<name> # KeyRest
&<name> # Block
(<name> {, <name>}+) # Parallel
iObject Method(
iObject req,
iObject opt = null, // [Optional]
[Key] iObject keyreq, // [Key]
[Key] iObject keyopt = null, // [Key] + [Optional]
[Key] Hash keyrest, // [Key] + Hash
Func<iObject> block, // Delegate, last parameter or before [ParamArray]
params iObject[] rest // [ParamArray]
)Example: f(a: 1)
They are passed as a 2 element array, since the CallSite knows that that parameter is a KeyOpt.
So, it is transformed into: site<'f'>.Call(new Array() { new Symbol("a"), new Fixnum(1) })
== => iObject#Equals(iObject) (by default equal?)
equal? => object::ReferenceEquals(object, object)
eql? => (iObject i, iObject a) => i.hash == a.hash