| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 JumpTarget target = elements.getTargetDefinition(node); | 446 JumpTarget target = elements.getTargetDefinition(node); |
| 447 Element error = | 447 Element error = |
| 448 (compiler.backend as JavaScriptBackend).getFallThroughError(); | 448 (compiler.backend as JavaScriptBackend).getFallThroughError(); |
| 449 irBuilder.buildSimpleSwitch(target, value, cases, defaultCase, error, | 449 irBuilder.buildSimpleSwitch(target, value, cases, defaultCase, error, |
| 450 sourceInformationBuilder.buildGeneric(node)); | 450 sourceInformationBuilder.buildGeneric(node)); |
| 451 } | 451 } |
| 452 | 452 |
| 453 visitTryStatement(ast.TryStatement node) { | 453 visitTryStatement(ast.TryStatement node) { |
| 454 List<CatchClauseInfo> catchClauseInfos = <CatchClauseInfo>[]; | 454 List<CatchClauseInfo> catchClauseInfos = <CatchClauseInfo>[]; |
| 455 for (ast.CatchBlock catchClause in node.catchBlocks.nodes) { | 455 for (ast.CatchBlock catchClause in node.catchBlocks.nodes) { |
| 456 assert(catchClause.exception != null); | 456 LocalVariableElement exceptionVariable; |
| 457 LocalVariableElement exceptionVariable = elements[catchClause.exception]; | 457 if (catchClause.exception != null) { |
| 458 exceptionVariable = elements[catchClause.exception]; |
| 459 } |
| 458 LocalVariableElement stackTraceVariable; | 460 LocalVariableElement stackTraceVariable; |
| 459 if (catchClause.trace != null) { | 461 if (catchClause.trace != null) { |
| 460 stackTraceVariable = elements[catchClause.trace]; | 462 stackTraceVariable = elements[catchClause.trace]; |
| 461 } | 463 } |
| 462 DartType type; | 464 DartType type; |
| 463 if (catchClause.onKeyword != null) { | 465 if (catchClause.onKeyword != null) { |
| 464 type = elements.getType(catchClause.type); | 466 type = elements.getType(catchClause.type); |
| 465 } | 467 } |
| 466 catchClauseInfos.add(new CatchClauseInfo( | 468 catchClauseInfos.add(new CatchClauseInfo( |
| 467 type: type, | 469 type: type, |
| (...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3349 if (compiler.backend.isForeign(function)) { | 3351 if (compiler.backend.isForeign(function)) { |
| 3350 return handleForeignCode(node, function, argumentList, callStructure); | 3352 return handleForeignCode(node, function, argumentList, callStructure); |
| 3351 } else { | 3353 } else { |
| 3352 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3354 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3353 translateStaticArguments(argumentList, function, callStructure), | 3355 translateStaticArguments(argumentList, function, callStructure), |
| 3354 sourceInformation: | 3356 sourceInformation: |
| 3355 sourceInformationBuilder.buildCall(node, node.selector)); | 3357 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3356 } | 3358 } |
| 3357 } | 3359 } |
| 3358 } | 3360 } |
| OLD | NEW |