| 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'; | 5 import '../closure.dart'; |
| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 block.addSuccessor(newBlock); | 274 block.addSuccessor(newBlock); |
| 275 open(newBlock); | 275 open(newBlock); |
| 276 } | 276 } |
| 277 | 277 |
| 278 HInstruction callSetRuntimeTypeInfo( | 278 HInstruction callSetRuntimeTypeInfo( |
| 279 HInstruction typeInfo, HInstruction newObject); | 279 HInstruction typeInfo, HInstruction newObject); |
| 280 | 280 |
| 281 /// The element for which this SSA builder is being used. | 281 /// The element for which this SSA builder is being used. |
| 282 Element get targetElement; | 282 Element get targetElement; |
| 283 TypeBuilder get typeBuilder; | 283 TypeBuilder get typeBuilder; |
| 284 |
| 285 /// Helper to implement JS_GET_FLAG. |
| 286 /// |
| 287 /// The concrete SSA graph builder will extract a flag parameter from the |
| 288 /// JS_GET_FLAG call and then push a boolean result onto the stack. This |
| 289 /// function provides the boolean value corresponding to the given [flagName]. |
| 290 /// If [flagName] is not recognized, this function returns `null` and the |
| 291 /// concrete SSA builder reports an error. |
| 292 bool getFlagValue(String flagName) { |
| 293 switch (flagName) { |
| 294 case 'MUST_RETAIN_METADATA': |
| 295 return mirrorsData.mustRetainMetadata; |
| 296 case 'USE_CONTENT_SECURITY_POLICY': |
| 297 return options.useContentSecurityPolicy; |
| 298 case 'IS_FULL_EMITTER': |
| 299 return !USE_LAZY_EMITTER && !options.useStartupEmitter; |
| 300 default: |
| 301 return null; |
| 302 } |
| 303 } |
| 284 } | 304 } |
| OLD | NEW |