| Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| index e9d03deed2f83414c9c4e723a87a5b58f8249b86..6e1c994162e72dd815019d53163c0417f2897d1a 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| @@ -2416,21 +2416,15 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| return;
|
| }
|
| String name = _foreignConstantStringArgument(invocation, 0, 'JS_GET_FLAG');
|
| - bool value = false;
|
| - switch (name) {
|
| - case 'MUST_RETAIN_METADATA':
|
| - value = mirrorsData.mustRetainMetadata;
|
| - break;
|
| - case 'USE_CONTENT_SECURITY_POLICY':
|
| - value = options.useContentSecurityPolicy;
|
| - break;
|
| - default:
|
| - reporter.reportErrorMessage(
|
| - astAdapter.getNode(invocation),
|
| - MessageKind.GENERIC,
|
| - {'text': 'Error: Unknown internal flag "$name".'});
|
| - }
|
| - stack.add(graph.addConstantBool(value, closedWorld));
|
| + bool value = getFlagValue(name);
|
| + if (value == null) {
|
| + reporter.reportErrorMessage(
|
| + astAdapter.getNode(invocation),
|
| + MessageKind.GENERIC,
|
| + {'text': 'Error: Unknown internal flag "$name".'});
|
| + } else {
|
| + stack.add(graph.addConstantBool(value, closedWorld));
|
| + }
|
| }
|
|
|
| void handleJsInterceptorConstant(ir.StaticInvocation invocation) {
|
| @@ -2503,8 +2497,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| push(new HForeignCode(nativeBehavior.codeTemplate, ssaType, inputs,
|
| isStatement: !nativeBehavior.codeTemplate.isExpression,
|
| effects: nativeBehavior.sideEffects,
|
| - nativeBehavior: nativeBehavior)
|
| - ..sourceInformation = sourceInformation);
|
| + nativeBehavior: nativeBehavior)..sourceInformation = sourceInformation);
|
| }
|
|
|
| void handleJsStringConcat(ir.StaticInvocation invocation) {
|
| @@ -2608,8 +2601,9 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| _pushDynamicInvocation(
|
| invocation,
|
| astAdapter.typeOfInvocation(invocation, closedWorld),
|
| - <HInstruction>[receiver]..addAll(
|
| - _visitArgumentsForDynamicTarget(selector, invocation.arguments)));
|
| + <HInstruction>[receiver]
|
| + ..addAll(
|
| + _visitArgumentsForDynamicTarget(selector, invocation.arguments)));
|
| }
|
|
|
| bool _handleEqualsNull(ir.MethodInvocation invocation) {
|
|
|