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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart

Issue 302703002: Version 1.4.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.4/
Patch Set: Created 6 years, 7 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 | « dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
===================================================================
--- dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart (revision 36645)
+++ dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart (working copy)
@@ -135,8 +135,6 @@
String get lazyInitializerName
=> '${namer.isolateName}.\$lazy';
String get initName => 'init';
- String get makeConstListProperty
- => namer.getMappedInstanceName('makeConstantList');
jsAst.FunctionDeclaration get generateAccessorFunction {
const RANGE1_SIZE = RANGE1_LAST - RANGE1_FIRST + 1;
@@ -540,7 +538,7 @@
if (#)
Isolate.$finishClassesProperty = oldIsolate.$finishClassesProperty;
if (#)
- Isolate.$makeConstListProperty = oldIsolate.$makeConstListProperty;
+ Isolate.makeConstantList = oldIsolate.makeConstantList;
return Isolate;
}''',
[ needsDefineClass, hasMakeConstantList ]);
@@ -958,16 +956,14 @@
void emitMakeConstantListIfNotEmitted(CodeBuffer buffer) {
if (hasMakeConstantList) return;
hasMakeConstantList = true;
- jsAst.Statement value = new jsAst.ExpressionStatement(new jsAst.Assignment(
- new jsAst.PropertyAccess.field(
- new jsAst.VariableUse(namer.isolateName),
- makeConstListProperty),
- js('''function(list) {
- list.immutable\$list = $initName;
- list.fixed\$length = $initName;
- return list;
- }''')));
- buffer.write(jsAst.prettyPrint(value, compiler));
+ buffer
+ ..write(namer.isolateName)
+ ..write('''.makeConstantList = function(list) {
+ list.immutable\$list = $initName;
+ list.fixed\$length = $initName;
+ return list;
+};
+''');
}
/// Returns the code equivalent to:
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698