| 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:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 5214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5225 !link.isEmpty; | 5225 !link.isEmpty; |
| 5226 link = link.tail) { | 5226 link = link.tail) { |
| 5227 visit(link.head); | 5227 visit(link.head); |
| 5228 inputs.add(pop()); | 5228 inputs.add(pop()); |
| 5229 } | 5229 } |
| 5230 instruction = buildLiteralList(inputs); | 5230 instruction = buildLiteralList(inputs); |
| 5231 add(instruction); | 5231 add(instruction); |
| 5232 instruction = setRtiIfNeeded(instruction, node); | 5232 instruction = setRtiIfNeeded(instruction, node); |
| 5233 } | 5233 } |
| 5234 | 5234 |
| 5235 TypeMask type = _inferredTypeOfNewList(node); | 5235 TypeMask type = _inferredTypeOfListLiteral(node); |
| 5236 if (!type.containsAll(closedWorld)) { | 5236 if (!type.containsAll(closedWorld)) { |
| 5237 instruction.instructionType = type; | 5237 instruction.instructionType = type; |
| 5238 } | 5238 } |
| 5239 stack.add(instruction); | 5239 stack.add(instruction); |
| 5240 } | 5240 } |
| 5241 | 5241 |
| 5242 _inferredTypeOfNewList(ast.Node node) => | 5242 _inferredTypeOfNewList(ast.Send node) => |
| 5243 _resultOf(sourceElement).typeOfNewList(node) ?? commonMasks.dynamicType; | 5243 _resultOf(sourceElement).typeOfNewList(node) ?? commonMasks.dynamicType; |
| 5244 | 5244 |
| 5245 _inferredTypeOfListLiteral(ast.LiteralList node) => |
| 5246 _resultOf(sourceElement).typeOfListLiteral(node) ?? |
| 5247 commonMasks.dynamicType; |
| 5248 |
| 5245 visitConditional(ast.Conditional node) { | 5249 visitConditional(ast.Conditional node) { |
| 5246 SsaBranchBuilder brancher = new SsaBranchBuilder(this, compiler, node); | 5250 SsaBranchBuilder brancher = new SsaBranchBuilder(this, compiler, node); |
| 5247 brancher.handleConditional(() => visit(node.condition), | 5251 brancher.handleConditional(() => visit(node.condition), |
| 5248 () => visit(node.thenExpression), () => visit(node.elseExpression)); | 5252 () => visit(node.thenExpression), () => visit(node.elseExpression)); |
| 5249 } | 5253 } |
| 5250 | 5254 |
| 5251 visitStringInterpolation(ast.StringInterpolation node) { | 5255 visitStringInterpolation(ast.StringInterpolation node) { |
| 5252 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); | 5256 StringBuilderVisitor stringBuilder = new StringBuilderVisitor(this, node); |
| 5253 stringBuilder.visit(node); | 5257 stringBuilder.visit(node); |
| 5254 stack.add(stringBuilder.result); | 5258 stack.add(stringBuilder.result); |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6719 this.oldReturnLocal, | 6723 this.oldReturnLocal, |
| 6720 this.oldReturnType, | 6724 this.oldReturnType, |
| 6721 this.oldResolvedAst, | 6725 this.oldResolvedAst, |
| 6722 this.oldStack, | 6726 this.oldStack, |
| 6723 this.oldLocalsHandler, | 6727 this.oldLocalsHandler, |
| 6724 this.inTryStatement, | 6728 this.inTryStatement, |
| 6725 this.allFunctionsCalledOnce, | 6729 this.allFunctionsCalledOnce, |
| 6726 this.oldElementInferenceResults) | 6730 this.oldElementInferenceResults) |
| 6727 : super(function); | 6731 : super(function); |
| 6728 } | 6732 } |
| OLD | NEW |