| Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart
|
| diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
|
| index 89766d12b75c77824bc30d72c8a15331ff6f9f2d..746af2564852b5573d355c6c7dfaa082d4b7fb06 100644
|
| --- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
|
| +++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
|
| @@ -7,19 +7,20 @@ library _js_helper;
|
| import 'dart:_async_await_error_codes' as async_error_codes;
|
|
|
| import 'dart:_js_embedded_names' show
|
| - JsGetName,
|
| + DEFERRED_LIBRARY_URIS,
|
| + DEFERRED_LIBRARY_HASHES,
|
| GET_TYPE_FROM_NAME,
|
| GET_ISOLATE_TAG,
|
| + INITIALIZE_LOADED_HUNK,
|
| INTERCEPTED_NAMES,
|
| INTERCEPTORS_BY_TAG,
|
| - LEAF_TAGS,
|
| - METADATA,
|
| - DEFERRED_LIBRARY_URIS,
|
| - DEFERRED_LIBRARY_HASHES,
|
| - INITIALIZE_LOADED_HUNK,
|
| IS_HUNK_LOADED,
|
| IS_HUNK_INITIALIZED,
|
| - NATIVE_SUPERCLASS_TAG_NAME;
|
| + JsGetName,
|
| + LEAF_TAGS,
|
| + METADATA,
|
| + NATIVE_SUPERCLASS_TAG_NAME,
|
| + TYPES;
|
|
|
| import 'dart:collection';
|
|
|
| @@ -30,9 +31,9 @@ import 'dart:_isolate_helper' show
|
| leaveJsAsync;
|
|
|
| import 'dart:async' show
|
| - Future,
|
| - DeferredLoadException,
|
| Completer,
|
| + DeferredLoadException,
|
| + Future,
|
| StreamController,
|
| Stream,
|
| StreamSubscription,
|
| @@ -69,7 +70,7 @@ import 'dart:_foreign_helper' show
|
|
|
| import 'dart:_interceptors';
|
| import 'dart:_internal' as _symbol_dev;
|
| -import 'dart:_internal' show MappedIterable, EfficientLength;
|
| +import 'dart:_internal' show EfficientLength, MappedIterable;
|
|
|
| import 'dart:_native_typed_data';
|
|
|
| @@ -536,7 +537,7 @@ class ReflectionInfo {
|
| @NoInline()
|
| computeFunctionRti(jsConstructor) {
|
| if (JS('bool', 'typeof # == "number"', functionType)) {
|
| - return getMetadata(functionType);
|
| + return getType(functionType);
|
| } else if (JS('bool', 'typeof # == "function"', functionType)) {
|
| var fakeInstance = JS('', 'new #()', jsConstructor);
|
| setRuntimeTypeInfo(
|
| @@ -556,6 +557,11 @@ getMetadata(int index) {
|
| return JS('', '#[#]', metadata, index);
|
| }
|
|
|
| +getType(int index) {
|
| + var types = JS_EMBEDDED_GLOBAL('', TYPES);
|
| + return JS('', '#[#]', types, index);
|
| +}
|
| +
|
| class Primitives {
|
| /// Isolate-unique ID for caching [JsClosureMirror.function].
|
| /// Note the initial value is used by the first isolate (or if there are no
|
| @@ -2147,13 +2153,13 @@ abstract class Closure implements Function {
|
|
|
| var signatureFunction;
|
| if (JS('bool', 'typeof # == "number"', functionType)) {
|
| - var metadata = JS_EMBEDDED_GLOBAL('', METADATA);
|
| + var types = JS_EMBEDDED_GLOBAL('', TYPES);
|
| // It is ok, if the access is inlined into the JS. The access is safe in
|
| // and outside the function. In fact we prefer if there is a textual
|
| // inlining.
|
| signatureFunction =
|
| JS('', '(function(s){return function(){return #[s]}})(#)',
|
| - metadata,
|
| + types,
|
| functionType);
|
| } else if (!isStatic
|
| && JS('bool', 'typeof # == "function"', functionType)) {
|
|
|