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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 1153963002: Remove value check from ICData checks/house-keeping (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 7 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 | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 5a72f7831847a21e15f57a48bb7725fd51e81cc2..c414fe9a87fd91dcdf8a782611179d4559d1c411 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -1876,13 +1876,14 @@ void EffectGraphVisitor::VisitComparisonNode(ComparisonNode* node) {
PushArgumentInstr* push_right = PushArgument(for_right_value.value());
arguments->Add(push_right);
+ const intptr_t kNumArgsChecked = 2;
Definition* result = new(Z) InstanceCallInstr(
node->token_pos(),
Symbols::EqualOperator(),
Token::kEQ, // Result is negated later for kNE.
arguments,
Object::null_array(),
- 2,
+ kNumArgsChecked,
owner()->ic_data_array());
if (node->kind() == Token::kNE) {
if (Isolate::Current()->TypeChecksEnabled() ||
@@ -3093,12 +3094,13 @@ void EffectGraphVisitor::VisitInstanceSetterNode(InstanceSetterNode* node) {
BuildInstanceSetterArguments(node, arguments, kResultNotNeeded);
const String& name =
String::ZoneHandle(Z, Field::SetterSymbol(node->field_name()));
+ const intptr_t kNumArgsChecked = 1; // Do not check value type.
InstanceCallInstr* call = new(Z) InstanceCallInstr(node->token_pos(),
name,
Token::kSET,
arguments,
Object::null_array(),
- 2, // Checked arg count.
+ kNumArgsChecked,
owner()->ic_data_array());
ReturnDefinition(call);
}
@@ -3110,12 +3112,13 @@ void ValueGraphVisitor::VisitInstanceSetterNode(InstanceSetterNode* node) {
BuildInstanceSetterArguments(node, arguments, kResultNeeded);
const String& name =
String::ZoneHandle(Z, Field::SetterSymbol(node->field_name()));
+ const intptr_t kNumArgsChecked = 1; // Do not check value type.
Do(new(Z) InstanceCallInstr(node->token_pos(),
name,
Token::kSET,
arguments,
Object::null_array(),
- 2, // Checked argument count.
+ kNumArgsChecked,
owner()->ic_data_array()));
ReturnDefinition(BuildLoadExprTemp());
}
@@ -3738,7 +3741,7 @@ Definition* EffectGraphVisitor::BuildStoreIndexedValues(
}
} else {
// Generate dynamic call to operator []=.
- const intptr_t checked_argument_count = 3;
+ const intptr_t checked_argument_count = 2; // Do not check for value type.
const String& name =
String::ZoneHandle(Z, Symbols::New(Token::Str(Token::kASSIGN_INDEX)));
InstanceCallInstr* store =
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698