| 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 closure; | 7 import '../closure.dart' as closure; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Identifiers, | 10 Identifiers, |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 assert(invariant(nativeBody, | 1361 assert(invariant(nativeBody, |
| 1362 !nativeRedirectionRegExp.hasMatch(javaScriptCode), | 1362 !nativeRedirectionRegExp.hasMatch(javaScriptCode), |
| 1363 message: "Deprecated syntax, use @JSName('name') instead.")); | 1363 message: "Deprecated syntax, use @JSName('name') instead.")); |
| 1364 assert(invariant(nativeBody, | 1364 assert(invariant(nativeBody, |
| 1365 function.functionSignature.parameterCount == 0, | 1365 function.functionSignature.parameterCount == 0, |
| 1366 message: 'native "..." syntax is restricted to ' | 1366 message: 'native "..." syntax is restricted to ' |
| 1367 'functions with zero parameters.')); | 1367 'functions with zero parameters.')); |
| 1368 irBuilder.buildNativeFunctionBody(function, javaScriptCode, | 1368 irBuilder.buildNativeFunctionBody(function, javaScriptCode, |
| 1369 sourceInformationBuilder.buildForeignCode(node)); | 1369 sourceInformationBuilder.buildForeignCode(node)); |
| 1370 } else { | 1370 } else { |
| 1371 String name = backend.getFixedBackendName(function); | 1371 String name = backend.nativeData.getFixedBackendName(function); |
| 1372 irBuilder.buildRedirectingNativeFunctionBody(function, name, source); | 1372 irBuilder.buildRedirectingNativeFunctionBody(function, name, source); |
| 1373 } | 1373 } |
| 1374 } else { | 1374 } else { |
| 1375 irBuilder.buildReturn( | 1375 irBuilder.buildReturn( |
| 1376 value: build(node.expression), | 1376 value: build(node.expression), |
| 1377 sourceInformation: source); | 1377 sourceInformation: source); |
| 1378 } | 1378 } |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 visitSwitchStatement(ast.SwitchStatement node) { | 1381 visitSwitchStatement(ast.SwitchStatement node) { |
| (...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4251 | 4251 |
| 4252 bool isNative(ClassElement element) => _backend.isNative(element); | 4252 bool isNative(ClassElement element) => _backend.isNative(element); |
| 4253 | 4253 |
| 4254 bool isJsInterop(FunctionElement element) => _backend.isJsInterop(element); | 4254 bool isJsInterop(FunctionElement element) => _backend.isJsInterop(element); |
| 4255 | 4255 |
| 4256 bool isJsInteropAnonymous(FunctionElement element) => | 4256 bool isJsInteropAnonymous(FunctionElement element) => |
| 4257 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); | 4257 _backend.jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass); |
| 4258 | 4258 |
| 4259 String getJsInteropTargetPath(FunctionElement element) { | 4259 String getJsInteropTargetPath(FunctionElement element) { |
| 4260 return '${_backend.namer.fixedBackendPath(element)}.' | 4260 return '${_backend.namer.fixedBackendPath(element)}.' |
| 4261 '${_backend.getFixedBackendName(element)}'; | 4261 '${_backend.nativeData.getFixedBackendName(element)}'; |
| 4262 } | 4262 } |
| 4263 | 4263 |
| 4264 DartType get jsJavascriptObjectType => | 4264 DartType get jsJavascriptObjectType => |
| 4265 _backend.helpers.jsJavaScriptObjectClass.thisType; | 4265 _backend.helpers.jsJavaScriptObjectClass.thisType; |
| 4266 } | 4266 } |
| OLD | NEW |