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

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

Issue 1183453005: fixes #226 super == and fixes #227 escape \r \f (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 | lib/src/js/builder.dart » ('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 99b6e21a478354d30df987ae992f274f8f0ba2fb..a559435c57d6764fd4dc1fe720ab5df941c5bd07 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -1938,6 +1938,8 @@ class JSCodegenVisitor extends GeneralizingAstVisitor {
// We can also do this if both sides are the same primitive type.
if (_canUsePrimitiveEquality(left, right)) {
code = op.type == TokenType.EQ_EQ ? '# == #' : '# != #';
+ } else if (left is SuperExpression) {
+ return _emitSend(left, op.lexeme, [right]);
} else {
var bang = op.type == TokenType.BANG_EQ ? '!' : '';
code = '${bang}dart.equals(#, #)';
« no previous file with comments | « no previous file | lib/src/js/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698