| 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 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 collectedVariableDeclarations = new OrderedSet<String>(), | 217 collectedVariableDeclarations = new OrderedSet<String>(), |
| 218 currentContainer = new js.Block.empty(), | 218 currentContainer = new js.Block.empty(), |
| 219 parameters = <js.Parameter>[], | 219 parameters = <js.Parameter>[], |
| 220 expressionStack = <js.Expression>[], | 220 expressionStack = <js.Expression>[], |
| 221 oldContainerStack = <js.Block>[], | 221 oldContainerStack = <js.Block>[], |
| 222 generateAtUseSite = new Set<HInstruction>(), | 222 generateAtUseSite = new Set<HInstruction>(), |
| 223 controlFlowOperators = new Set<HInstruction>(), | 223 controlFlowOperators = new Set<HInstruction>(), |
| 224 breakAction = new Map<Element, ElementAction>(), | 224 breakAction = new Map<Element, ElementAction>(), |
| 225 continueAction = new Map<Element, ElementAction>(); | 225 continueAction = new Map<Element, ElementAction>(); |
| 226 | 226 |
| 227 LibraryElement get currentLibrary => work.element.getLibrary(); | |
| 228 Compiler get compiler => backend.compiler; | 227 Compiler get compiler => backend.compiler; |
| 229 NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter; | 228 NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter; |
| 230 CodegenEnqueuer get world => backend.compiler.enqueuer.codegen; | 229 CodegenEnqueuer get world => backend.compiler.enqueuer.codegen; |
| 231 | 230 |
| 232 bool isGenerateAtUseSite(HInstruction instruction) { | 231 bool isGenerateAtUseSite(HInstruction instruction) { |
| 233 return generateAtUseSite.contains(instruction); | 232 return generateAtUseSite.contains(instruction); |
| 234 } | 233 } |
| 235 | 234 |
| 236 bool isNonNegativeInt32Constant(HInstruction instruction) { | 235 bool isNonNegativeInt32Constant(HInstruction instruction) { |
| 237 if (instruction.isConstantInteger()) { | 236 if (instruction.isConstantInteger()) { |
| (...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3018 if (leftType.canBeNull() && rightType.canBeNull()) { | 3017 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 3019 if (left.isConstantNull() || right.isConstantNull() || | 3018 if (left.isConstantNull() || right.isConstantNull() || |
| 3020 (leftType.isPrimitive() && leftType == rightType)) { | 3019 (leftType.isPrimitive() && leftType == rightType)) { |
| 3021 return '=='; | 3020 return '=='; |
| 3022 } | 3021 } |
| 3023 return null; | 3022 return null; |
| 3024 } else { | 3023 } else { |
| 3025 return '==='; | 3024 return '==='; |
| 3026 } | 3025 } |
| 3027 } | 3026 } |
| OLD | NEW |