| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
| 10 import '../native/native.dart' as native; | 10 import '../native/native.dart' as native; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 /// Returns the [FieldEntity] corresponding to the field [node]. | 47 /// Returns the [FieldEntity] corresponding to the field [node]. |
| 48 FieldEntity getField(ir.Field node); | 48 FieldEntity getField(ir.Field node); |
| 49 | 49 |
| 50 /// Returns the [ClassEntity] corresponding to the class [node]. | 50 /// Returns the [ClassEntity] corresponding to the class [node]. |
| 51 ClassEntity getClass(ir.Class node); | 51 ClassEntity getClass(ir.Class node); |
| 52 | 52 |
| 53 /// Returns the [Local] corresponding to the [node]. The node must be either | 53 /// Returns the [Local] corresponding to the [node]. The node must be either |
| 54 /// a [ir.FunctionDeclaration] or [ir.FunctionExpression]. | 54 /// a [ir.FunctionDeclaration] or [ir.FunctionExpression]. |
| 55 Local getLocalFunction(ir.Node node); | 55 Local getLocalFunction(ir.Node node); |
| 56 | 56 |
| 57 /// Returns the [LibraryEntity] corresponding to the library [node]. |
| 58 LibraryEntity getLibrary(ir.Library node); |
| 59 |
| 57 /// Returns the [Name] corresponding to [name]. | 60 /// Returns the [Name] corresponding to [name]. |
| 58 Name getName(ir.Name name); | 61 Name getName(ir.Name name); |
| 59 | 62 |
| 60 /// Returns `true` is [node] has a `@Native(...)` annotation. | 63 /// Returns `true` is [node] has a `@Native(...)` annotation. |
| 61 bool isNativeClass(ir.Class node); | 64 bool isNativeClass(ir.Class node); |
| 62 | 65 |
| 63 /// Return `true` if [node] is the `dart:_foreign_helper` library. | 66 /// Return `true` if [node] is the `dart:_foreign_helper` library. |
| 64 bool isForeignLibrary(ir.Library node); | 67 bool isForeignLibrary(ir.Library node); |
| 65 | 68 |
| 66 /// Computes the native behavior for reading the native [field]. | 69 /// Computes the native behavior for reading the native [field]. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 94 } | 97 } |
| 95 | 98 |
| 96 /// Kinds of foreign functions. | 99 /// Kinds of foreign functions. |
| 97 enum ForeignKind { | 100 enum ForeignKind { |
| 98 JS, | 101 JS, |
| 99 JS_BUILTIN, | 102 JS_BUILTIN, |
| 100 JS_EMBEDDED_GLOBAL, | 103 JS_EMBEDDED_GLOBAL, |
| 101 JS_INTERCEPTOR_CONSTANT, | 104 JS_INTERCEPTOR_CONSTANT, |
| 102 NONE, | 105 NONE, |
| 103 } | 106 } |
| OLD | NEW |