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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
6 import 'package:kernel/frontend/accessors.dart' | 6 import 'package:kernel/frontend/accessors.dart' |
7 show | 7 show |
8 Accessor, | 8 Accessor, |
9 IndexAccessor, | 9 IndexAccessor, |
10 NullAwarePropertyAccessor, | 10 NullAwarePropertyAccessor, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 try { | 250 try { |
251 return node?.accept(this); | 251 return node?.accept(this); |
252 } finally { | 252 } finally { |
253 isVoidContext = wasVoidContext; | 253 isVoidContext = wasVoidContext; |
254 } | 254 } |
255 } | 255 } |
256 | 256 |
257 ir.TreeNode visitWithCurrentContext(Expression node) => node?.accept(this); | 257 ir.TreeNode visitWithCurrentContext(Expression node) => node?.accept(this); |
258 | 258 |
259 withCurrentElement(AstElement element, f()) { | 259 withCurrentElement(AstElement element, f()) { |
260 assert(element.library == kernel.compiler.currentElement.library); | 260 assert( |
| 261 element.library == (kernel.compiler.currentElement as Element).library); |
261 Element previousElement = currentElement; | 262 Element previousElement = currentElement; |
262 currentElement = element; | 263 currentElement = element; |
263 try { | 264 try { |
264 return f(); | 265 return f(); |
265 } finally { | 266 } finally { |
266 currentElement = previousElement; | 267 currentElement = previousElement; |
267 } | 268 } |
268 } | 269 } |
269 | 270 |
270 ir.DartType computeType(TypeAnnotation node) { | 271 ir.DartType computeType(TypeAnnotation node) { |
(...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2966 : this(null, true, node, initializers); | 2967 : this(null, true, node, initializers); |
2967 | 2968 |
2968 accept(ir.Visitor v) => throw "unsupported"; | 2969 accept(ir.Visitor v) => throw "unsupported"; |
2969 | 2970 |
2970 visitChildren(ir.Visitor v) => throw "unsupported"; | 2971 visitChildren(ir.Visitor v) => throw "unsupported"; |
2971 | 2972 |
2972 String toString() { | 2973 String toString() { |
2973 return "IrFunction($kind, $isConstructor, $node, $initializers)"; | 2974 return "IrFunction($kind, $isConstructor, $node, $initializers)"; |
2974 } | 2975 } |
2975 } | 2976 } |
OLD | NEW |