| Index: frog/leg/emitter.dart
|
| diff --git a/frog/leg/emitter.dart b/frog/leg/emitter.dart
|
| index 887feb6f535e8347eb6a70e4d7880d493ce5ed9b..737276911653f527288cf9cc967cec0478afa923 100644
|
| --- a/frog/leg/emitter.dart
|
| +++ b/frog/leg/emitter.dart
|
| @@ -3,6 +3,18 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| /**
|
| + * A function element that represents a closure call. The signature is copied
|
| + * from the given element.
|
| + */
|
| +class ClosureInvocationElement extends FunctionElement {
|
| + ClosureInvocationElement(SourceString name,
|
| + FunctionElement other)
|
| + : super.from(name, other, null);
|
| +
|
| + isInstanceMember() => true;
|
| +}
|
| +
|
| +/**
|
| * Generates the code for all used classes in the program. Static fields (even
|
| * in classes) are ignored, since they can be treated as non-class elements.
|
| *
|
| @@ -495,12 +507,9 @@ if (typeof $dynamicMetadataName == 'undefined') $dynamicMetadataName = [];
|
| // The static function does not have the correct name. Since
|
| // [addParameterStubs] use the name to create its stubs we simply
|
| // create a fake element with the correct name.
|
| - // Note: the callElement will not have the correct modifiers (in case
|
| - // of static functions) and will not have any enclosingElement.
|
| + // Note: the callElement will not have any enclosingElement.
|
| FunctionElement callElement =
|
| - new FunctionElement.from(Namer.CLOSURE_INVOCATION_NAME,
|
| - element,
|
| - null);
|
| + new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, element);
|
| String staticName = namer.isolatePropertyAccess(element);
|
| int parameterCount = element.parameterCount(compiler);
|
| String invocationName =
|
| @@ -554,10 +563,9 @@ if (typeof $dynamicMetadataName == 'undefined') $dynamicMetadataName = [];
|
| // Now add the methods on the closure class. The instance method does not
|
| // have the correct name. Since [addParameterStubs] use the name to create
|
| // its stubs we simply create a fake element with the correct name.
|
| - // Note: the callElement will not have the correct modifiers (in case
|
| - // of static functions) and will not have any enclosingElement.
|
| + // Note: the callElement will not have any enclosingElement.
|
| FunctionElement callElement =
|
| - new FunctionElement.from(Namer.CLOSURE_INVOCATION_NAME, member, null);
|
| + new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, member);
|
|
|
| int parameterCount = member.parameterCount(compiler);
|
| String invocationName =
|
|
|