| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'package:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
| 6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
| 7 | 7 |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 kernel.functions[_backend.helpers.setRuntimeTypeInfo]; | 371 kernel.functions[_backend.helpers.setRuntimeTypeInfo]; |
| 372 | 372 |
| 373 TypeMask get assertThrowReturnType => TypeMaskFactory | 373 TypeMask get assertThrowReturnType => TypeMaskFactory |
| 374 .inferredReturnTypeForElement(_backend.helpers.assertThrow, _compiler); | 374 .inferredReturnTypeForElement(_backend.helpers.assertThrow, _compiler); |
| 375 | 375 |
| 376 ir.Class get objectClass => kernel.classes[_compiler.coreClasses.objectClass]; | 376 ir.Class get objectClass => kernel.classes[_compiler.coreClasses.objectClass]; |
| 377 | 377 |
| 378 ir.Procedure get currentIsolate => | 378 ir.Procedure get currentIsolate => |
| 379 kernel.functions[_backend.helpers.currentIsolate]; | 379 kernel.functions[_backend.helpers.currentIsolate]; |
| 380 | 380 |
| 381 ir.Procedure get callInIsolate => |
| 382 kernel.functions[_backend.helpers.callInIsolate]; |
| 383 |
| 381 bool isInForeignLibrary(ir.Member member) => | 384 bool isInForeignLibrary(ir.Member member) => |
| 382 _backend.isForeign(getElement(member)); | 385 _backend.isForeign(getElement(member)); |
| 383 | 386 |
| 384 native.NativeBehavior getNativeBehavior(ir.Node node) { | 387 native.NativeBehavior getNativeBehavior(ir.Node node) { |
| 385 return elements.getNativeData(getNode(node)); | 388 return elements.getNativeData(getNode(node)); |
| 386 } | 389 } |
| 387 | 390 |
| 388 js.Name getNameForJsGetName(ir.Node argument, ConstantValue constant) { | 391 js.Name getNameForJsGetName(ir.Node argument, ConstantValue constant) { |
| 389 int index = _extractEnumIndexFromConstantValue( | 392 int index = _extractEnumIndexFromConstantValue( |
| 390 constant, _backend.helpers.jsGetNameEnum); | 393 constant, _backend.helpers.jsGetNameEnum); |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 astAdapter.reporter.internalError( | 817 astAdapter.reporter.internalError( |
| 815 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); | 818 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); |
| 816 return null; | 819 return null; |
| 817 } | 820 } |
| 818 | 821 |
| 819 @override | 822 @override |
| 820 ConstantExpression visitStringLiteral(ir.StringLiteral node) { | 823 ConstantExpression visitStringLiteral(ir.StringLiteral node) { |
| 821 return new StringConstantExpression(node.value); | 824 return new StringConstantExpression(node.value); |
| 822 } | 825 } |
| 823 } | 826 } |
| OLD | NEW |