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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 256003002: JavaScript Binary expressions not subclass of Call (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js/template.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 class SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 10
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 expressions = sequence.expressions; 788 expressions = sequence.expressions;
789 } else { 789 } else {
790 expressions = <js.Expression>[jsInitialization]; 790 expressions = <js.Expression>[jsInitialization];
791 } 791 }
792 bool canTransformToVariableDeclaration = true; 792 bool canTransformToVariableDeclaration = true;
793 for (js.Expression expression in expressions) { 793 for (js.Expression expression in expressions) {
794 bool expressionIsVariableAssignment = false; 794 bool expressionIsVariableAssignment = false;
795 if (expression is js.Assignment) { 795 if (expression is js.Assignment) {
796 js.Assignment assignment = expression; 796 js.Assignment assignment = expression;
797 if (assignment.leftHandSide is js.VariableUse && 797 if (assignment.leftHandSide is js.VariableUse &&
798 assignment.compoundTarget == null) { 798 !assignment.isCompound) {
799 expressionIsVariableAssignment = true; 799 expressionIsVariableAssignment = true;
800 } 800 }
801 } 801 }
802 if (!expressionIsVariableAssignment) { 802 if (!expressionIsVariableAssignment) {
803 canTransformToVariableDeclaration = false; 803 canTransformToVariableDeclaration = false;
804 break; 804 break;
805 } 805 }
806 } 806 }
807 if (canTransformToVariableDeclaration) { 807 if (canTransformToVariableDeclaration) {
808 List<js.VariableInitialization> inits = 808 List<js.VariableInitialization> inits =
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 js.PropertyAccess accessHelper(String name) { 2681 js.PropertyAccess accessHelper(String name) {
2682 Element helper = compiler.findHelper(name); 2682 Element helper = compiler.findHelper(name);
2683 if (helper == null) { 2683 if (helper == null) {
2684 // For mocked-up tests. 2684 // For mocked-up tests.
2685 return js.js('(void 0).$name'); 2685 return js.js('(void 0).$name');
2686 } 2686 }
2687 world.registerStaticUse(helper); 2687 world.registerStaticUse(helper);
2688 return backend.namer.elementAccess(helper); 2688 return backend.namer.elementAccess(helper);
2689 } 2689 }
2690 } 2690 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js/template.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698