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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2300873002: VM: Compute static guarded cid for final instance fields. (Closed)
Patch Set: address comments Created 4 years, 3 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 8367316db4b53b12f8c01aa917aaeefb295551ad..e668652800e57bd2b4e06f7f0cceb8cab3df0a59 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -62,6 +62,7 @@ DECLARE_FLAG(int, inlining_caller_size_threshold);
DECLARE_FLAG(int, inlining_constant_arguments_max_size_threshold);
DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold);
DECLARE_FLAG(int, reload_every);
+DECLARE_FLAG(bool, unbox_numeric_fields);
static void PrecompilationModeHandler(bool value) {
if (value) {
@@ -94,6 +95,7 @@ static void PrecompilationModeHandler(bool value) {
FLAG_reorder_basic_blocks = false;
FLAG_use_field_guards = false;
FLAG_use_cha_deopt = false;
+ FLAG_unbox_numeric_fields = false;
#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
// Set flags affecting runtime accordingly for dart_noopt.
@@ -1144,7 +1146,8 @@ bool FlowGraphCompiler::TryIntrinsify() {
*return_node.value()->AsLoadInstanceFieldNode();
// Only intrinsify getter if the field cannot contain a mutable double.
// Reading from a mutable double box requires allocating a fresh double.
- if (!IsPotentialUnboxedField(load_node.field())) {
+ if (FLAG_precompiled_mode ||
+ !IsPotentialUnboxedField(load_node.field())) {
GenerateInlinedGetter(load_node.field().Offset());
return !FLAG_use_field_guards;
}
@@ -1159,7 +1162,8 @@ bool FlowGraphCompiler::TryIntrinsify() {
ASSERT(sequence_node.NodeAt(1)->IsReturnNode());
const StoreInstanceFieldNode& store_node =
*sequence_node.NodeAt(0)->AsStoreInstanceFieldNode();
- if (store_node.field().guarded_cid() == kDynamicCid) {
+ if (FLAG_precompiled_mode ||
+ (store_node.field().guarded_cid() == kDynamicCid)) {
GenerateInlinedSetter(store_node.field().Offset());
return !FLAG_use_field_guards;
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698