| OLD | NEW |
| 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 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 8 import '../common/tasks.dart' show CompilerTask; | 8 import '../common/tasks.dart' show CompilerTask; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constant_system.dart'; | 10 import '../constants/constant_system.dart'; |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 bool visitLoopInfo(HLoopBlockInformation info) { | 830 bool visitLoopInfo(HLoopBlockInformation info) { |
| 831 HExpressionInformation condition = info.condition; | 831 HExpressionInformation condition = info.condition; |
| 832 bool isConditionExpression = isJSCondition(condition); | 832 bool isConditionExpression = isJSCondition(condition); |
| 833 | 833 |
| 834 js.Loop loop; | 834 js.Loop loop; |
| 835 | 835 |
| 836 switch (info.kind) { | 836 switch (info.kind) { |
| 837 // Treate all three "test-first" loops the same way. | 837 // Treat all three "test-first" loops the same way. |
| 838 case HLoopBlockInformation.FOR_LOOP: | 838 case HLoopBlockInformation.FOR_LOOP: |
| 839 case HLoopBlockInformation.WHILE_LOOP: | 839 case HLoopBlockInformation.WHILE_LOOP: |
| 840 case HLoopBlockInformation.FOR_IN_LOOP: | 840 case HLoopBlockInformation.FOR_IN_LOOP: |
| 841 case HLoopBlockInformation.SWITCH_CONTINUE_LOOP: | 841 case HLoopBlockInformation.SWITCH_CONTINUE_LOOP: |
| 842 HBlockInformation initialization = info.initializer; | 842 HBlockInformation initialization = info.initializer; |
| 843 int initializationType = TYPE_STATEMENT; | 843 int initializationType = TYPE_STATEMENT; |
| 844 if (initialization != null) { | 844 if (initialization != null) { |
| 845 initializationType = expressionType(initialization); | 845 initializationType = expressionType(initialization); |
| 846 if (initializationType == TYPE_STATEMENT) { | 846 if (initializationType == TYPE_STATEMENT) { |
| 847 generateStatements(initialization); | 847 generateStatements(initialization); |
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 registry.registerStaticUse(new StaticUse.staticInvoke( | 3098 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 3099 helper, new CallStructure.unnamed(argumentCount))); | 3099 helper, new CallStructure.unnamed(argumentCount))); |
| 3100 return backend.emitter.staticFunctionAccess(helper); | 3100 return backend.emitter.staticFunctionAccess(helper); |
| 3101 } | 3101 } |
| 3102 | 3102 |
| 3103 @override | 3103 @override |
| 3104 void visitRef(HRef node) { | 3104 void visitRef(HRef node) { |
| 3105 visit(node.value); | 3105 visit(node.value); |
| 3106 } | 3106 } |
| 3107 } | 3107 } |
| OLD | NEW |