| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2724 } | 2724 } |
| 2725 ast.LiteralString string = argument.asLiteralString(); | 2725 ast.LiteralString string = argument.asLiteralString(); |
| 2726 if (string == null) { | 2726 if (string == null) { |
| 2727 reporter.reportErrorMessage(argument, MessageKind.GENERIC, | 2727 reporter.reportErrorMessage(argument, MessageKind.GENERIC, |
| 2728 {'text': 'Error: Expected a literal string.'}); | 2728 {'text': 'Error: Expected a literal string.'}); |
| 2729 } | 2729 } |
| 2730 String name = string.dartString.slowToString(); | 2730 String name = string.dartString.slowToString(); |
| 2731 bool value = false; | 2731 bool value = false; |
| 2732 switch (name) { | 2732 switch (name) { |
| 2733 case 'MUST_RETAIN_METADATA': | 2733 case 'MUST_RETAIN_METADATA': |
| 2734 value = backend.mustRetainMetadata; | 2734 value = backend.mirrorsData.mustRetainMetadata; |
| 2735 break; | 2735 break; |
| 2736 case 'USE_CONTENT_SECURITY_POLICY': | 2736 case 'USE_CONTENT_SECURITY_POLICY': |
| 2737 value = compiler.options.useContentSecurityPolicy; | 2737 value = compiler.options.useContentSecurityPolicy; |
| 2738 break; | 2738 break; |
| 2739 default: | 2739 default: |
| 2740 reporter.reportErrorMessage(node, MessageKind.GENERIC, | 2740 reporter.reportErrorMessage(node, MessageKind.GENERIC, |
| 2741 {'text': 'Error: Unknown internal flag "$name".'}); | 2741 {'text': 'Error: Unknown internal flag "$name".'}); |
| 2742 } | 2742 } |
| 2743 stack.add(graph.addConstantBool(value, closedWorld)); | 2743 stack.add(graph.addConstantBool(value, closedWorld)); |
| 2744 } | 2744 } |
| (...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6731 this.oldReturnLocal, | 6731 this.oldReturnLocal, |
| 6732 this.oldReturnType, | 6732 this.oldReturnType, |
| 6733 this.oldResolvedAst, | 6733 this.oldResolvedAst, |
| 6734 this.oldStack, | 6734 this.oldStack, |
| 6735 this.oldLocalsHandler, | 6735 this.oldLocalsHandler, |
| 6736 this.inTryStatement, | 6736 this.inTryStatement, |
| 6737 this.allFunctionsCalledOnce, | 6737 this.allFunctionsCalledOnce, |
| 6738 this.oldElementInferenceResults) | 6738 this.oldElementInferenceResults) |
| 6739 : super(function); | 6739 : super(function); |
| 6740 } | 6740 } |
| OLD | NEW |