| 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:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 if (_unexpectedForeignArguments(invocation, 1, 1)) { | 2412 if (_unexpectedForeignArguments(invocation, 1, 1)) { |
| 2413 stack.add( | 2413 stack.add( |
| 2414 // Result expected on stack. | 2414 // Result expected on stack. |
| 2415 graph.addConstantBool(false, closedWorld)); | 2415 graph.addConstantBool(false, closedWorld)); |
| 2416 return; | 2416 return; |
| 2417 } | 2417 } |
| 2418 String name = _foreignConstantStringArgument(invocation, 0, 'JS_GET_FLAG'); | 2418 String name = _foreignConstantStringArgument(invocation, 0, 'JS_GET_FLAG'); |
| 2419 bool value = false; | 2419 bool value = false; |
| 2420 switch (name) { | 2420 switch (name) { |
| 2421 case 'MUST_RETAIN_METADATA': | 2421 case 'MUST_RETAIN_METADATA': |
| 2422 value = backend.mustRetainMetadata; | 2422 value = backend.mirrorsData.mustRetainMetadata; |
| 2423 break; | 2423 break; |
| 2424 case 'USE_CONTENT_SECURITY_POLICY': | 2424 case 'USE_CONTENT_SECURITY_POLICY': |
| 2425 value = compiler.options.useContentSecurityPolicy; | 2425 value = compiler.options.useContentSecurityPolicy; |
| 2426 break; | 2426 break; |
| 2427 default: | 2427 default: |
| 2428 compiler.reporter.reportErrorMessage( | 2428 compiler.reporter.reportErrorMessage( |
| 2429 astAdapter.getNode(invocation), | 2429 astAdapter.getNode(invocation), |
| 2430 MessageKind.GENERIC, | 2430 MessageKind.GENERIC, |
| 2431 {'text': 'Error: Unknown internal flag "$name".'}); | 2431 {'text': 'Error: Unknown internal flag "$name".'}); |
| 2432 } | 2432 } |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3227 enterBlock.setBlockFlow( | 3227 enterBlock.setBlockFlow( |
| 3228 new HTryBlockInformation( | 3228 new HTryBlockInformation( |
| 3229 kernelBuilder.wrapStatementGraph(bodyGraph), | 3229 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 3230 exception, | 3230 exception, |
| 3231 kernelBuilder.wrapStatementGraph(catchGraph), | 3231 kernelBuilder.wrapStatementGraph(catchGraph), |
| 3232 kernelBuilder.wrapStatementGraph(finallyGraph)), | 3232 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 3233 exitBlock); | 3233 exitBlock); |
| 3234 kernelBuilder.inTryStatement = previouslyInTryStatement; | 3234 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 3235 } | 3235 } |
| 3236 } | 3236 } |
| OLD | NEW |