Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2836733002: dart2js: patch file support cleanup (Closed)
Patch Set: remove js_array change Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/patch_parser.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 6179fb49c28d853ab521c30381c9ad47fb3918db..efa17b031c22f3d80d04814b6a8849571e9e048f 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -2708,19 +2708,13 @@ class SsaBuilder extends ast.Visitor
{'text': 'Error: Expected a literal string.'});
}
String name = string.dartString.slowToString();
- 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(node, MessageKind.GENERIC,
- {'text': 'Error: Unknown internal flag "$name".'});
+ bool value = getFlagValue(name);
+ if (value == null) {
+ reporter.reportErrorMessage(node, MessageKind.GENERIC,
+ {'text': 'Error: Unknown internal flag "$name".'});
+ } else {
+ stack.add(graph.addConstantBool(value, closedWorld));
}
- stack.add(graph.addConstantBool(value, closedWorld));
}
void handleForeignJsGetName(ast.Send node) {
@@ -2989,8 +2983,7 @@ class SsaBuilder extends ast.Visitor
graph.addConstantString(new ast.DartString.literal(loadId), closedWorld)
];
push(new HInvokeStatic(loadFunction, inputs, commonMasks.nonNullType,
- targetCanThrow: false)
- ..sourceInformation = sourceInformation);
+ targetCanThrow: false)..sourceInformation = sourceInformation);
}
generateSuperNoSuchMethodSend(
@@ -4086,8 +4079,7 @@ class SsaBuilder extends ast.Visitor
nativeBehavior.codeTemplate = codeTemplate;
return new HForeignCode(codeTemplate, commonMasks.dynamicType, inputs,
- nativeBehavior: nativeBehavior)
- ..sourceInformation = sourceInformation;
+ nativeBehavior: nativeBehavior)..sourceInformation = sourceInformation;
}
void pushInvokeStatic(
« no previous file with comments | « pkg/compiler/lib/src/patch_parser.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698