Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/native_helper.dart

Issue 829083002: dart2js: Share nativeSuperclassTagName between runtime and compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of _js_helper; 5 part of _js_helper;
6 6
7 7
8 // TODO(ngeoffray): stop using this method once our optimizers can 8 // TODO(ngeoffray): stop using this method once our optimizers can
9 // change str1.contains(str2) into str1.indexOf(str2) != -1. 9 // change str1.contains(str2) into str1.indexOf(str2) != -1.
10 bool contains(String userAgent, String name) { 10 bool contains(String userAgent, String name) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 /** 105 /**
106 * A JavaScript object mapping tags to `true` or `false`. 106 * A JavaScript object mapping tags to `true` or `false`.
107 * 107 *
108 * Example: 'HTMLImageElement' maps to `true` since, as there are no subclasses 108 * Example: 'HTMLImageElement' maps to `true` since, as there are no subclasses
109 * of ImageElement, it is a leaf class in the native class hierarchy. 109 * of ImageElement, it is a leaf class in the native class hierarchy.
110 */ 110 */
111 get leafTags => JS_EMBEDDED_GLOBAL('=Object', LEAF_TAGS); 111 get leafTags => JS_EMBEDDED_GLOBAL('=Object', LEAF_TAGS);
112 112
113 String findDispatchTagForInterceptorClass(interceptorClassConstructor) { 113 String findDispatchTagForInterceptorClass(interceptorClassConstructor) {
114 return JS('', r'#.$nativeSuperclassTag', interceptorClassConstructor); 114 return JS('', r'#.#',
115 interceptorClassConstructor, NATIVE_SUPERCLASS_TAG_NAME);
115 } 116 }
116 117
117 /** 118 /**
118 * Cache of dispatch records for instances. This is a JavaScript object used as 119 * Cache of dispatch records for instances. This is a JavaScript object used as
119 * a map. Keys are instance tags, e.g. "!SomeThing". The cache permits the 120 * a map. Keys are instance tags, e.g. "!SomeThing". The cache permits the
120 * sharing of one dispatch record between multiple instances. 121 * sharing of one dispatch record between multiple instances.
121 */ 122 */
122 var dispatchRecordsForInstanceTags; 123 var dispatchRecordsForInstanceTags;
123 124
124 /** 125 /**
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 const _safariHooksTransformer = const JS_CONST(r''' 643 const _safariHooksTransformer = const JS_CONST(r'''
643 function(hooks) { return hooks; } 644 function(hooks) { return hooks; }
644 '''); 645 ''');
645 646
646 647
647 const _dartExperimentalFixupGetTagHooksTransformer = const JS_CONST(r''' 648 const _dartExperimentalFixupGetTagHooksTransformer = const JS_CONST(r'''
648 function(hooks) { 649 function(hooks) {
649 if (typeof dartExperimentalFixupGetTag != "function") return hooks; 650 if (typeof dartExperimentalFixupGetTag != "function") return hooks;
650 hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); 651 hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
651 }'''); 652 }''');
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698