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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart

Issue 954253002: dart2js: add compiler builtins to the core-runtime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix bad return type. (Also removes duplicate getInterceptor call). Created 5 years, 8 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 | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | pkg/compiler/lib/src/native/behavior.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/old_emitter/setup_program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
index 5d77ebdc207b547a937db49569d2d7e5689d82cc..58ad5bd8f634c6c66846aec8214d90cb4ade494b 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
@@ -21,8 +21,10 @@ const RANGE2_ADJUST = - (FIRST_FIELD_CODE + RANGE1_SIZE - RANGE2_FIRST);
const RANGE3_ADJUST =
- (FIRST_FIELD_CODE + RANGE1_SIZE + RANGE2_SIZE - RANGE3_FIRST);
-String get setupProgramName => 'setupProgram';
-
+const String setupProgramName ='setupProgram';
+// TODO(floitsch): make sure this property can't clash with anything. It's
+// unlikely since it lives on types, but still.
+const String typeNameProperty = r'builtin$cls';
jsAst.Statement buildSetupProgram(Program program, Compiler compiler,
JavaScriptBackend backend,
@@ -237,7 +239,7 @@ function $setupProgramName(programData, typesOffset) {
body += "this." + #deferredActionString + "();";
}
str += ") {\\n" + body + "}\\n";
- str += name + ".builtin\$cls=\\"" + name + "\\";\\n";
+ str += name + ".$typeNameProperty=\\"" + name + "\\";\\n";
str += "\$desc=\$collectedClasses." + name + "[1];\\n";
str += name + ".prototype = \$desc;\\n";
if (typeof defineClass.name != "string") {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698