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

Unified Diff: dart/frog/leg/emitter.dart

Issue 9578021: Revert "Refactor constant part." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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/frog/leg/compiler.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/emitter.dart
diff --git a/dart/frog/leg/emitter.dart b/dart/frog/leg/emitter.dart
index 118548f8371bfad6ea8dfe58668e0b74cf48a8c3..b9f79d49c1ee4b8721a5e14ae791c0a15d2b294f 100644
--- a/dart/frog/leg/emitter.dart
+++ b/dart/frog/leg/emitter.dart
@@ -71,7 +71,7 @@ function(child, parent) {
assert(selector.namedArgumentCount == 0);
return;
}
- ConstantHandler handler = compiler.constantHandler;
+ CompileTimeConstantHandler constants = compiler.compileTimeConstantHandler;
List<SourceString> names = selector.getOrderedNamedArguments();
String invocationName =
@@ -133,7 +133,7 @@ function(child, parent) {
argumentsBuffer[count] = jsName;
parametersBuffer[selector.positionalArgumentCount + index] = jsName;
} else {
- Constant value = handler.initialVariableValues[element];
+ Constant value = constants.initialVariableValues[element];
if (value == null) {
argumentsBuffer[count] = '(void 0)';
} else {
@@ -143,7 +143,7 @@ function(child, parent) {
indexOfLastOptionalArgumentInParameters = count;
}
argumentsBuffer[count] =
- handler.writeJsCode(new StringBuffer(), value).toString();
+ constants.writeJsCode(new StringBuffer(), value).toString();
}
}
}
@@ -475,7 +475,7 @@ function(child, parent) {
// this.staticNonFinal = Isolate.prototype.someVal;
// ...
// }
- ConstantHandler handler = compiler.constantHandler;
+ CompileTimeConstantHandler handler = compiler.compileTimeConstantHandler;
List<VariableElement> staticNonFinalFields =
handler.getStaticNonFinalFieldsForEmission();
if (!staticNonFinalFields.isEmpty()) buffer.add('\n');
@@ -489,7 +489,7 @@ function(child, parent) {
}
void emitCompileTimeConstants(StringBuffer buffer) {
- ConstantHandler handler = compiler.constantHandler;
+ CompileTimeConstantHandler handler = compiler.compileTimeConstantHandler;
List<Constant> constants = handler.getConstantsForEmission();
String prototype = "${namer.ISOLATE}.prototype";
emitMakeConstantList(prototype, buffer);
@@ -512,13 +512,13 @@ function(child, parent) {
}
void emitStaticFinalFieldInitializations(StringBuffer buffer) {
- ConstantHandler handler = compiler.constantHandler;
+ CompileTimeConstantHandler constants = compiler.compileTimeConstantHandler;
List<VariableElement> staticFinalFields =
- handler.getStaticFinalFieldsForEmission();
+ constants.getStaticFinalFieldsForEmission();
for (VariableElement element in staticFinalFields) {
buffer.add('${namer.isolatePropertyAccess(element)} = ');
compiler.withCurrentElement(element, () {
- handler.writeJsCodeForVariable(buffer, element);
+ constants.writeJsCodeForVariable(buffer, element);
});
buffer.add(';\n');
}
« no previous file with comments | « dart/frog/leg/compiler.dart ('k') | dart/frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698