| 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 '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 6 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 7 import '../common/tasks.dart' show CompilerTask; | 7 import '../common/tasks.dart' show CompilerTask; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 bool visitTryInfo(HTryBlockInformation info) { | 733 bool visitTryInfo(HTryBlockInformation info) { |
| 734 js.Block body = generateStatementsInNewBlock(info.body); | 734 js.Block body = generateStatementsInNewBlock(info.body); |
| 735 js.Catch catchPart = null; | 735 js.Catch catchPart = null; |
| 736 js.Block finallyPart = null; | 736 js.Block finallyPart = null; |
| 737 if (info.catchBlock != null) { | 737 if (info.catchBlock != null) { |
| 738 void register(ClassElement classElement) { | 738 void register(ClassElement classElement) { |
| 739 if (classElement != null) { | 739 if (classElement != null) { |
| 740 registry.registerInstantiatedClass(classElement); | 740 registry.registerInstantiatedClass(classElement); |
| 741 } | 741 } |
| 742 } | 742 } |
| 743 |
| 743 register(helpers.jsPlainJavaScriptObjectClass); | 744 register(helpers.jsPlainJavaScriptObjectClass); |
| 744 register(helpers.jsUnknownJavaScriptObjectClass); | 745 register(helpers.jsUnknownJavaScriptObjectClass); |
| 745 | 746 |
| 746 HLocalValue exception = info.catchVariable; | 747 HLocalValue exception = info.catchVariable; |
| 747 String name = variableNames.getName(exception); | 748 String name = variableNames.getName(exception); |
| 748 js.VariableDeclaration decl = new js.VariableDeclaration(name); | 749 js.VariableDeclaration decl = new js.VariableDeclaration(name); |
| 749 js.Block catchBlock = generateStatementsInNewBlock(info.catchBlock); | 750 js.Block catchBlock = generateStatementsInNewBlock(info.catchBlock); |
| 750 catchPart = new js.Catch(decl, catchBlock); | 751 catchPart = new js.Catch(decl, catchBlock); |
| 751 } | 752 } |
| 752 if (info.finallyBlock != null) { | 753 if (info.finallyBlock != null) { |
| (...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2913 registry.registerStaticUse(new StaticUse.staticInvoke( | 2914 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 2914 helper, new CallStructure.unnamed(argumentCount))); | 2915 helper, new CallStructure.unnamed(argumentCount))); |
| 2915 return backend.emitter.staticFunctionAccess(helper); | 2916 return backend.emitter.staticFunctionAccess(helper); |
| 2916 } | 2917 } |
| 2917 | 2918 |
| 2918 @override | 2919 @override |
| 2919 void visitRef(HRef node) { | 2920 void visitRef(HRef node) { |
| 2920 visit(node.value); | 2921 visit(node.value); |
| 2921 } | 2922 } |
| 2922 } | 2923 } |
| OLD | NEW |