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

Unified Diff: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart

Issue 851473002: Use prototype inheritance to reduce number of is check properties. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments. 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
index a2b1c62fac1067953f7190305ed5066e56196c76..1c8b0b98fc58da16152a30f52635ca430355e401 100644
--- a/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart
@@ -109,8 +109,10 @@ class ModelEmitter {
'outputContainsConstantList': program.outputContainsConstantList,
'embeddedGlobals': emitEmbeddedGlobals(program.loadMap),
'constants': emitConstants(fragment.constants),
- 'staticNonFinals': emitStaticNonFinalFields(fragment.staticNonFinalFields),
+ 'staticNonFinals':
+ emitStaticNonFinalFields(fragment.staticNonFinalFields),
'nativeBoilerplate': nativeBoilerplate,
+ 'operatorIsPrefix': js.string(namer.operatorIsPrefix),
'eagerClasses': emitEagerClassInitializations(fragment.libraries),
'main': fragment.main,
'code': code});
@@ -491,6 +493,7 @@ class ModelEmitter {
}
constructor.builtin\$cls = name; // Needed for RTI.
constructor.prototype = prototype;
+ prototype[#operatorIsPrefix + name] = constructor;
prototype.constructor = constructor;
return constructor;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698