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

Unified Diff: frog/leg/emitter.dart

Issue 9360039: Create values for literal Strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. 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
Index: frog/leg/emitter.dart
diff --git a/frog/leg/emitter.dart b/frog/leg/emitter.dart
index b227b497fb3a0e1fc193f0dc71dc6c380bda0188..87e2a30a389d2d6ccd1cddd846d8aaed4a6b91d3 100644
--- a/frog/leg/emitter.dart
+++ b/frog/leg/emitter.dart
@@ -107,7 +107,8 @@ function(child, parent) {
argumentsBuffer[count] = jsName;
parametersBuffer[selector.positionalArgumentCount + index] = jsName;
} else {
- argumentsBuffer[count] = constants.getJsCodeForVariable(element);
+ var value = constants.writeJsCodeForVariable(new StringBuffer(), element);
floitsch 2012/02/14 16:08:02 80 chars.
karlklose 2012/02/15 10:37:30 Done.
+ argumentsBuffer[count] = value.toString();
}
}
count++;
@@ -302,7 +303,7 @@ function(child, parent) {
for (Element element in staticNonFinalFields) {
buffer.add(' this.${namer.getName(element)} = ');
compiler.withCurrentElement(element, () {
- buffer.add(constants.getJsCodeForVariable(element));
+ constants.writeJsCodeForVariable(buffer, element);
});
buffer.add(';\n');
}
@@ -315,7 +316,7 @@ function(child, parent) {
for (VariableElement element in staticFinalFields) {
buffer.add('${namer.isolatePropertyAccess(element)} = ');
compiler.withCurrentElement(element, () {
- buffer.add(constants.getJsCodeForVariable(element));
+ constants.writeJsCodeForVariable(buffer, element);
});
buffer.add(';\n');
}

Powered by Google App Engine
This is Rietveld 408576698