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

Unified Diff: frog/member.dart

Issue 9447049: Put two $ in front of top-level builtins, to not clash with member names. Otherwise, the global obj… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « frog/corejs.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/member.dart
===================================================================
--- frog/member.dart (revision 4562)
+++ frog/member.dart (working copy)
@@ -1148,7 +1148,7 @@
} else if (args.length == 1 && args.values[0].type.isNum) {
if (name == ':truncdiv' || name == ':mod') {
world.gen.corejs.useOperator(name);
- code = '$jsname(${target.code}, ${argsCode[0]})';
+ code = '\$$jsname(${target.code}, ${argsCode[0]})';
} else {
var op = TokenKind.rawOperatorFromMethod(name);
code = '${target.code} $op ${argsCode[0]}';
@@ -1197,7 +1197,7 @@
world.gen.corejs.useOperator(name);
// TODO(jimhug): Should be able to use faster path sometimes here!
return new Value(inferredResult,
- '$jsname(${target.code}, ${argsCode[0]})', node.span);
+ '\$$jsname(${target.code}, ${argsCode[0]})', node.span);
}
if (isCallMethod) {
@@ -1214,7 +1214,7 @@
} else {
world.gen.corejs.useOperator(name);
var argsString = argsCode.length == 0 ? '' : ', ${argsCode[0]}';
- return new Value(returnType, '$jsname(${target.code}${argsString})',
+ return new Value(returnType, '\$$jsname(${target.code}${argsString})',
node.span);
}
« no previous file with comments | « frog/corejs.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698