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

Unified Diff: pkg/compiler/lib/src/ssa/graph_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/ssa/builder_kernel.dart ('k') | sdk/lib/_internal/js_runtime/lib/annotations.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/graph_builder.dart
diff --git a/pkg/compiler/lib/src/ssa/graph_builder.dart b/pkg/compiler/lib/src/ssa/graph_builder.dart
index b2909dc0aba3fa581f6da8e97ac9e4ed90c03e19..a401e464ccf33e0b7904cfc80fdd7a9eaae3a469 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -281,4 +281,24 @@ abstract class GraphBuilder {
/// The element for which this SSA builder is being used.
Element get targetElement;
TypeBuilder get typeBuilder;
+
+ /// Helper to implement JS_GET_FLAG.
+ ///
+ /// The concrete SSA graph builder will extract a flag parameter from the
+ /// JS_GET_FLAG call and then push a boolean result onto the stack. This
+ /// function provides the boolean value corresponding to the given [flagName].
+ /// If [flagName] is not recognized, this function returns `null` and the
+ /// concrete SSA builder reports an error.
+ bool getFlagValue(String flagName) {
+ switch (flagName) {
+ case 'MUST_RETAIN_METADATA':
+ return mirrorsData.mustRetainMetadata;
+ case 'USE_CONTENT_SECURITY_POLICY':
+ return options.useContentSecurityPolicy;
+ case 'IS_FULL_EMITTER':
+ return !USE_LAZY_EMITTER && !options.useStartupEmitter;
+ default:
+ return null;
+ }
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | sdk/lib/_internal/js_runtime/lib/annotations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698