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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1074923003: rename dart_runtime.js helpers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 | « lib/runtime/dart_runtime.js ('k') | test/codegen/expect/BenchmarkBase.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 654073628fd7a4eac6fa94b93fed8145f6390bf1..7a01c69a0338153604a85b35a7cc0243c56c8533 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -1302,13 +1302,13 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (rules.isDynamicCall(node.methodName)) {
var args = _visit(node.argumentList);
if (target != null) {
- return js.call('dart.dinvoke(#, #, #)', [
+ return js.call('dart.dsend(#, #, #)', [
_visit(target),
js.string(node.methodName.name, "'"),
args
]);
} else {
- return js.call('dart.dinvokef(#, #)', [_visit(node.methodName), args]);
+ return js.call('dart.dcall(#, #)', [_visit(node.methodName), args]);
}
}
@@ -1352,7 +1352,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
FunctionExpressionInvocation node) {
var code;
if (rules.isDynamicCall(node.function)) {
- code = 'dart.dinvokef(#, #)';
+ code = 'dart.dcall(#, #)';
} else {
code = '#(#)';
}
@@ -1649,7 +1649,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (rules.isDynamicTarget(left)) {
// dynamic dispatch
return js.call(
- 'dart.dbinary(#, #, #)', [_visit(left), opString, _visit(right)]);
+ 'dart.dsend(#, #, #)', [_visit(left), opString, _visit(right)]);
} else if (_isJSBuiltinType(leftType)) {
// TODO(jmesserly): we'd get better readability from the static-dispatch
// pattern below. Consider:
@@ -1860,7 +1860,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
var opString = _emitMemberName(op.lexeme, unary: true);
if (rules.isDynamicTarget(expr)) {
// dynamic dispatch
- return js.call('dart.dunary(#, #)', [opString, _visit(expr)]);
+ return js.call('dart.dsend(#, #)', [_visit(expr), opString]);
} else if (_isJSBuiltinType(dispatchType)) {
return js.call(
'#.#(#)', [_emitTypeName(dispatchType), opString, _visit(expr)]);
« no previous file with comments | « lib/runtime/dart_runtime.js ('k') | test/codegen/expect/BenchmarkBase.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698