Method | Description | |
---|---|---|
FMethodEmit ( |
Constructor.
|
|
FMethodEmit ( |
Constructor.
|
|
emitCtor ( ) : void |
Emit a constructor - constructors get created as a static factory methods, so that that CallNew can just push args and invoke them fan: class Foo { new make(Long a) { ... } } .net: static Foo make(Long a) { return make_(new Foo(), a) } static Foo make_(Foo self, Long a) { ... return self } We call the first method "make" the "factory" and the second method "make_" the "body". CallNew opcodes are routed to the ctor factory, and CallCtor opcodes are routed to the ctor body.
|
|
emitInterfaceRouter ( |
The CLR requires all methods implemented by an interface to be marked as virtual. However, Fantom (and Java) allow this: mixin Mixin { abstract Long foo() } class Base { Long foo() { return 5 } } class Child : Base, Mixin { // don't need to implement foo() since Base defined it } So to work correctly in the CLR we need to trap this case and emit a virtual router method on child to satisfy the interface requirement: class Child : Base, Mixin { public virtual Long foo() { return base.foo(); } } TODO - optimize the intra-pod case
|
|
emitMixinBody ( ) : void | ||
emitMixinInterface ( ) : void |
Emit the method as a mixin interface
|
|
emitMixinRouter ( |
Emit a mixin router from a class to the mixin body methods.
|
|
emitNative ( ) : void | ||
emitStandard ( ) : void |
Emit a standard instance/static class method.
|
Method | Description | |
---|---|---|
doEmit ( ) : PERWAPI.CILInstructions |
This is the method that all the public emitX methods route to once everything is setup correctly.
|
Method | Description | |
---|---|---|
doEmit ( string localNames, string localTypes ) : PERWAPI.CILInstructions | ||
emitWrapper ( PERWAPI main, int paramLen ) : void |
Emit wrapper.
|
|
emitWrappers ( ) : void |
Emit wrappers.
|
|
pushArgs ( PERWAPI code, bool self, int count ) : void |
Push the specified number of arguments onto the stack.
|
public FMethodEmit ( |
||
emit | ||
return | System.Collections |
public FMethodEmit ( |
||
emit | ||
method | ||
return | System.Collections |
protected doEmit ( ) : PERWAPI.CILInstructions | ||
return | PERWAPI.CILInstructions |
public emitInterfaceRouter ( |
||
implType | ||
m | ||
return | void |
public emitMixinRouter ( |
||
m | ||
return | void |