From ee42a0a0aa078577915401eafee465d977076b95 Mon Sep 17 00:00:00 2001 From: Sigmund Cherem Date: Fri, 14 Oct 2016 14:22:11 -0700 Subject: [PATCH] Add js-interop support to the fast-startup emitter BUG= R=jacobr@google.com Review URL: https://codereview.chromium.org/2420173002 . --- .../src/js_emitter/startup_emitter/fragment_emitter.dart | 6 ++++++ tests/html/html.status | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart index 222b1c6293f..3d4e9ba4fa4 100644 --- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart +++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart @@ -345,6 +345,9 @@ var #staticStateDeclaration = {}; // Native-support uses setOrUpdateInterceptorsByTag and setOrUpdateLeafTags. #nativeSupport; +// Sets up the js-interop support. +#jsInteropSupport; + // Invokes main (making sure that it records the 'current-script' value). #invokeMain; })() @@ -497,6 +500,9 @@ class FragmentEmitter { 'nativeSupport': program.needsNativeSupport ? emitNativeSupport(fragment) : new js.EmptyStatement(), + 'jsInteropSupport': backend.jsInteropAnalysis.enabledJsInterop + ? backend.jsInteropAnalysis.buildJsInteropBootstrap() + : new js.EmptyStatement(), 'invokeMain': fragment.invokeMain, }); } diff --git a/tests/html/html.status b/tests/html/html.status index 2832bbfe32a..e65aaf86f3d 100644 --- a/tests/html/html.status +++ b/tests/html/html.status @@ -434,11 +434,6 @@ custom/document_register_type_extensions: Fail # custom elements not supported custom_elements_23127_test/baseline: Fail # custom elements not supported custom_elements_23127_test/c1t: Fail # custom elements not supported custom_elements_23127_test/c2: Fail # custom elements not supported -js_function_getter_test: Fail # js-interop function's not supported -js_typed_interop_callable_object_test: Fail # js-interop function's not supported -js_typed_interop_test/closure: Fail # js-interop function's not supported -js_typed_interop_test/method: Fail # js-interop function's not supported -js_typed_interop_window_property_test/bind*: Fail # js-interop function's not supported [ $compiler == dart2js && $cps_ir && $browser ] js_typed_interop_side_cast_exp_test: RuntimeError # Corner case in package:js that we might want to remove (See comment in #24978).