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 '../closure.dart' show ClosureDataLookup; | 5 import '../closure.dart' show ClosureDataLookup; |
6 import '../constants/constant_system.dart'; | 6 import '../constants/constant_system.dart'; |
7 import '../common/codegen.dart' show CodegenRegistry; | 7 import '../common/codegen.dart' show CodegenRegistry; |
8 import '../common_elements.dart'; | 8 import '../common_elements.dart'; |
9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
10 import '../deferred_load.dart'; | 10 import '../deferred_load.dart'; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 | 237 |
238 HSubExpressionBlockInformation wrapExpressionGraph(SubExpression expression) { | 238 HSubExpressionBlockInformation wrapExpressionGraph(SubExpression expression) { |
239 if (expression == null) return null; | 239 if (expression == null) return null; |
240 return new HSubExpressionBlockInformation(expression); | 240 return new HSubExpressionBlockInformation(expression); |
241 } | 241 } |
242 | 242 |
243 /// Returns the current source element. | 243 /// Returns the current source element. |
244 /// | 244 /// |
245 /// The returned element is a declaration element. | 245 /// The returned element is a declaration element. |
246 Element get sourceElement; | 246 MemberEntity get sourceElement; |
247 | 247 |
248 // TODO(karlklose): this is needed to avoid a bug where the resolved type is | 248 // TODO(karlklose): this is needed to avoid a bug where the resolved type is |
249 // not stored on a type annotation in the closure translator. Remove when | 249 // not stored on a type annotation in the closure translator. Remove when |
250 // fixed. | 250 // fixed. |
251 bool hasDirectLocal(Local local) { | 251 bool hasDirectLocal(Local local) { |
252 return !localsHandler.isAccessedDirectly(local) || | 252 return !localsHandler.isAccessedDirectly(local) || |
253 localsHandler.directLocals[local] != null; | 253 localsHandler.directLocals[local] != null; |
254 } | 254 } |
255 | 255 |
256 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type, | 256 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 return mirrorsData.mustRetainMetadata; | 298 return mirrorsData.mustRetainMetadata; |
299 case 'USE_CONTENT_SECURITY_POLICY': | 299 case 'USE_CONTENT_SECURITY_POLICY': |
300 return options.useContentSecurityPolicy; | 300 return options.useContentSecurityPolicy; |
301 case 'IS_FULL_EMITTER': | 301 case 'IS_FULL_EMITTER': |
302 return !USE_LAZY_EMITTER && !options.useStartupEmitter; | 302 return !USE_LAZY_EMITTER && !options.useStartupEmitter; |
303 default: | 303 default: |
304 return null; | 304 return null; |
305 } | 305 } |
306 } | 306 } |
307 } | 307 } |
OLD | NEW |