| 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 'package:js_runtime/shared/embedded_names.dart' | 7 import 'package:js_runtime/shared/embedded_names.dart' |
| 8 show JsBuiltin, JsGetName; | 8 show JsBuiltin, JsGetName; |
| 9 | 9 |
| 10 import '../closure.dart' as closure; | 10 import '../closure.dart' as closure; |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 arguments.insert(0, irBuilder.buildNullConstant()); | 2260 arguments.insert(0, irBuilder.buildNullConstant()); |
| 2261 } | 2261 } |
| 2262 // Use default values from the effective target, not the immediate target. | 2262 // Use default values from the effective target, not the immediate target. |
| 2263 ConstructorElement target; | 2263 ConstructorElement target; |
| 2264 if (constructor == compiler.symbolConstructor) { | 2264 if (constructor == compiler.symbolConstructor) { |
| 2265 // The Symbol constructor should perform validation of its argument | 2265 // The Symbol constructor should perform validation of its argument |
| 2266 // which is not expressible as a Dart const constructor. Instead, the | 2266 // which is not expressible as a Dart const constructor. Instead, the |
| 2267 // libraries contain a dummy const constructor implementation that | 2267 // libraries contain a dummy const constructor implementation that |
| 2268 // doesn't perform validation and the compiler compiles a call to | 2268 // doesn't perform validation and the compiler compiles a call to |
| 2269 // (non-const) Symbol.validated when it sees new Symbol(...). | 2269 // (non-const) Symbol.validated when it sees new Symbol(...). |
| 2270 target = compiler.symbolValidatedConstructor; | 2270 target = helpers.symbolValidatedConstructor; |
| 2271 } else { | 2271 } else { |
| 2272 target = constructor.implementation; | 2272 target = constructor.implementation; |
| 2273 } | 2273 } |
| 2274 while (target.isRedirectingFactory && !target.isCyclicRedirection) { | 2274 while (target.isRedirectingFactory && !target.isCyclicRedirection) { |
| 2275 target = target.effectiveTarget.implementation; | 2275 target = target.effectiveTarget.implementation; |
| 2276 } | 2276 } |
| 2277 | 2277 |
| 2278 callStructure = normalizeStaticArguments(callStructure, target, arguments); | 2278 callStructure = normalizeStaticArguments(callStructure, target, arguments); |
| 2279 TypeMask allocationSiteType; | 2279 TypeMask allocationSiteType; |
| 2280 | 2280 |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4015 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); | 4015 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); |
| 4016 | 4016 |
| 4017 String getJsInteropTargetPath(FunctionElement element) { | 4017 String getJsInteropTargetPath(FunctionElement element) { |
| 4018 return '${_backend.namer.fixedBackendPath(element)}.' | 4018 return '${_backend.namer.fixedBackendPath(element)}.' |
| 4019 '${_backend.nativeData.getFixedBackendName(element)}'; | 4019 '${_backend.nativeData.getFixedBackendName(element)}'; |
| 4020 } | 4020 } |
| 4021 | 4021 |
| 4022 DartType get jsJavascriptObjectType => | 4022 DartType get jsJavascriptObjectType => |
| 4023 _backend.helpers.jsJavaScriptObjectClass.thisType; | 4023 _backend.helpers.jsJavaScriptObjectClass.thisType; |
| 4024 } | 4024 } |
| OLD | NEW |