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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 833623003: dart2js: Merge intercepted names map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: replace TODO with comment. 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 side-by-side diff with in-line comments
Download patch
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 d2f38367b381e9d4d357e4e6a715f45953074e96..c53cf41f311bbea469e4bd780e737ca1b66d7322 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -224,18 +224,10 @@ class JSInvocationMirror implements Invocation {
var receiver = object;
var name = _internalName;
var arguments = _arguments;
- var embeddedInterceptedNames = JS_EMBEDDED_GLOBAL('', INTERCEPTED_NAMES);
- // TODO(ngeoffray): If this functionality ever become performance
- // critical, we might want to dynamically change [interceptedNames]
- // to be a JavaScript object with intercepted names as property
- // instead of a JavaScript array.
- // TODO(floitsch): we already add stubs (tear-off getters) as properties
- // in the embedded global interceptedNames.
- // Finish the transition and always use the object as hashtable.
+ var interceptedNames = JS_EMBEDDED_GLOBAL('', INTERCEPTED_NAMES);
bool isIntercepted =
- JS("bool",
- 'Object.prototype.hasOwnProperty.call(#, #) || #.indexOf(#) !== -1',
- embeddedInterceptedNames, name, interceptedNames, name);
+ JS("bool", 'Object.prototype.hasOwnProperty.call(#, #)',
+ interceptedNames, name);
if (isIntercepted) {
receiver = interceptor;
if (JS('bool', '# === #', object, interceptor)) {
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/interceptors.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