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

Unified Diff: sdk/lib/_internal/compiler/implementation/js/builder.dart

Issue 13704004: dart2js: Use js('source') instead of js['source'] to invoke JS mini-parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Go back to js.if_ instead of jsBuilder.if_ Created 7 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 | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js/builder.dart b/sdk/lib/_internal/compiler/implementation/js/builder.dart
index 54924661451afbe5d21a995fef2307daf70a8286..16f2b5d03d92fc39c762a6669508fcc28eedfef5 100644
--- a/sdk/lib/_internal/compiler/implementation/js/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/builder.dart
@@ -10,20 +10,10 @@ part of js;
class JsBuilder {
const JsBuilder();
- Expression operator [](String source) {
+ Expression call(String source) {
return new MiniJsParser(source).expression();
}
- // TODO(ahe): Remove this method.
- Binary equals(Expression left, Expression right) {
- return new Binary('==', left, right);
- }
-
- // TODO(ahe): Remove this method.
- Binary strictEquals(Expression left, Expression right) {
- return new Binary('===', left, right);
- }
-
LiteralString string(String value) => new LiteralString('"$value"');
If if_(condition, thenPart, [elsePart]) {
@@ -92,7 +82,7 @@ class JsBuilder {
if (expression is Expression) {
return expression;
} else if (expression is String) {
- return this[expression];
+ return this(expression);
} else if (expression is num) {
return new LiteralNumber('$expression');
} else if (expression is bool) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698