| 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 class SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); | 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA code generator'; | 7 String get name() => 'SSA code generator'; |
| 8 | 8 |
| 9 | 9 |
| 10 String buildJavaScriptFunction(FunctionElement element, | 10 String buildJavaScriptFunction(FunctionElement element, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 }); | 88 }); |
| 89 } | 89 } |
| 90 | 90 |
| 91 Map<Element, String> getParameterNames(WorkItem work) { | 91 Map<Element, String> getParameterNames(WorkItem work) { |
| 92 Map<Element, String> parameterNames = new LinkedHashMap<Element, String>(); | 92 Map<Element, String> parameterNames = new LinkedHashMap<Element, String>(); |
| 93 FunctionElement function = work.element; | 93 FunctionElement function = work.element; |
| 94 | 94 |
| 95 // The dom/html libraries have inline JS code that reference | 95 // The dom/html libraries have inline JS code that reference |
| 96 // parameter names directly. Long-term such code will be rejected. | 96 // parameter names directly. Long-term such code will be rejected. |
| 97 // Now, just don't mangle the parameter name. | 97 // Now, just don't mangle the parameter name. |
| 98 function.computeParameters(compiler).forEachParameter((Element element) { | 98 function.computeSignature(compiler).forEachParameter((Element element) { |
| 99 parameterNames[element] = function.isNative() | 99 parameterNames[element] = function.isNative() |
| 100 ? element.name.slowToString() | 100 ? element.name.slowToString() |
| 101 : JsNames.getValid('${element.name.slowToString()}'); | 101 : JsNames.getValid('${element.name.slowToString()}'); |
| 102 }); | 102 }); |
| 103 return parameterNames; | 103 return parameterNames; |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 | 106 |
| 107 typedef void ElementAction(Element element); | 107 typedef void ElementAction(Element element); |
| 108 | 108 |
| (...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2294 startBailoutSwitch(); | 2294 startBailoutSwitch(); |
| 2295 } | 2295 } |
| 2296 } | 2296 } |
| 2297 | 2297 |
| 2298 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2298 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2299 if (labeledBlockInfo.body.start.hasGuards()) { | 2299 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2300 endBailoutSwitch(); | 2300 endBailoutSwitch(); |
| 2301 } | 2301 } |
| 2302 } | 2302 } |
| 2303 } | 2303 } |
| OLD | NEW |