| Index: pkg/compiler/lib/src/js_model/elements.dart
|
| diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
|
| index d1bde087e14c97f89529b7383c167b1444a382a1..c9a53266596828c15214a4c6ac8c0820f7923c80 100644
|
| --- a/pkg/compiler/lib/src/js_model/elements.dart
|
| +++ b/pkg/compiler/lib/src/js_model/elements.dart
|
| @@ -174,7 +174,11 @@ class JsElementCreatorMixin {
|
|
|
| Local createLocalFunction(String name, MemberEntity memberContext,
|
| Entity executableContext, FunctionType functionType) {
|
| - throw new UnsupportedError('JsElementCreatorMixin.createLocalFunction');
|
| + // TODO(efortuna, johnniwinther): This function should not be called once
|
| + // the K + J element situation has been properly sorted out. Ultimately this
|
| + // should throw.
|
| + return new JLocalFunction(
|
| + name, memberContext, executableContext, functionType);
|
| }
|
|
|
| LibraryEntity convertLibrary(IndexedLibrary library) {
|
| @@ -517,6 +521,19 @@ class JTypeVariable implements TypeVariableEntity {
|
| '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)';
|
| }
|
|
|
| +class JLocalFunction implements Local {
|
| + final String name;
|
| + final MemberEntity memberContext;
|
| + final Entity executableContext;
|
| + final FunctionType functionType;
|
| +
|
| + JLocalFunction(
|
| + this.name, this.memberContext, this.executableContext, this.functionType);
|
| +
|
| + String toString() => '${jsElementPrefix}local_function'
|
| + '(${memberContext.name}.${name ?? '<anonymous>'})';
|
| +}
|
| +
|
| class JsClosedWorld extends ClosedWorldBase with KernelClosedWorldMixin {
|
| final JsKernelToElementMap elementMap;
|
|
|
|
|