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

Unified Diff: src/hydrogen.cc

Issue 14793014: Use AssumeRepresentation when the representation is known and will not change. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index f50a2d5796c3880b0a3a0fc3d4b4d3e327d690da..d37daccccf5162dba29d25b2b5999175b0dcd2e7 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -723,7 +723,7 @@ HInstruction* HGraphBuilder::IfBuilder::IfCompare(
new(zone()) HCompareIDAndBranch(left, right, token);
compare->set_observed_input_representation(input_representation,
input_representation);
- compare->ChangeRepresentation(input_representation);
+ compare->AssumeRepresentation(input_representation);
AddCompare(compare);
return compare;
}
@@ -905,7 +905,7 @@ HValue* HGraphBuilder::LoopBuilder::BeginBody(
phi_ = new(zone()) HPhi(env->values()->length(), zone());
header_block_->AddPhi(phi_);
phi_->AddInput(initial);
- phi_->ChangeRepresentation(Representation::Integer32());
+ phi_->AssumeRepresentation(Representation::Integer32());
env->Push(initial);
builder_->current_block()->GotoNoSimulate(header_block_);
@@ -921,7 +921,7 @@ HValue* HGraphBuilder::LoopBuilder::BeginBody(
new(zone()) HCompareIDAndBranch(phi_, terminating, token);
compare->set_observed_input_representation(input_representation,
input_representation);
- compare->ChangeRepresentation(input_representation);
+ compare->AssumeRepresentation(input_representation);
compare->SetSuccessorAt(0, body_block_);
compare->SetSuccessorAt(1, exit_block_);
builder_->current_block()->Finish(compare);
@@ -935,7 +935,7 @@ HValue* HGraphBuilder::LoopBuilder::BeginBody(
increment_ = HSub::New(zone(), context_, phi_, one);
}
increment_->ClearFlag(HValue::kCanOverflow);
- increment_->ChangeRepresentation(Representation::Integer32());
+ increment_->AssumeRepresentation(Representation::Integer32());
builder_->AddInstruction(increment_);
return increment_;
} else {
@@ -955,7 +955,7 @@ void HGraphBuilder::LoopBuilder::EndBody() {
increment_ = HSub::New(zone(), context_, phi_, one);
}
increment_->ClearFlag(HValue::kCanOverflow);
- increment_->ChangeRepresentation(Representation::Integer32());
+ increment_->AssumeRepresentation(Representation::Integer32());
builder_->AddInstruction(increment_);
}
@@ -1188,7 +1188,7 @@ HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object,
if (is_js_array) {
HValue* new_length = AddInstruction(
HAdd::New(zone, context, length, graph_->GetConstant1()));
- new_length->ChangeRepresentation(Representation::Integer32());
+ new_length->AssumeRepresentation(Representation::Integer32());
new_length->ClearFlag(HValue::kCanOverflow);
Factory* factory = isolate()->factory();
@@ -1374,7 +1374,7 @@ HValue* HGraphBuilder::BuildAllocateElements(HValue* context,
AddInstruction(elements_size_value);
HValue* mul = AddInstruction(
HMul::New(zone, context, capacity, elements_size_value));
- mul->ChangeRepresentation(Representation::Integer32());
+ mul->AssumeRepresentation(Representation::Integer32());
mul->ClearFlag(HValue::kCanOverflow);
HConstant* header_size =
@@ -1382,7 +1382,7 @@ HValue* HGraphBuilder::BuildAllocateElements(HValue* context,
AddInstruction(header_size);
HValue* total_size = AddInstruction(
HAdd::New(zone, context, mul, header_size));
- total_size->ChangeRepresentation(Representation::Integer32());
+ total_size->AssumeRepresentation(Representation::Integer32());
total_size->ClearFlag(HValue::kCanOverflow);
HAllocate::Flags flags = HAllocate::DefaultFlags(kind);
@@ -1538,12 +1538,12 @@ HValue* HGraphBuilder::BuildNewElementsCapacity(HValue* context,
HValue* half_old_capacity =
AddInstruction(HShr::New(zone, context, old_capacity,
graph_->GetConstant1()));
- half_old_capacity->ChangeRepresentation(Representation::Integer32());
+ half_old_capacity->AssumeRepresentation(Representation::Integer32());
half_old_capacity->ClearFlag(HValue::kCanOverflow);
HValue* new_capacity = AddInstruction(
HAdd::New(zone, context, half_old_capacity, old_capacity));
- new_capacity->ChangeRepresentation(Representation::Integer32());
+ new_capacity->AssumeRepresentation(Representation::Integer32());
new_capacity->ClearFlag(HValue::kCanOverflow);
HValue* min_growth =
@@ -1551,7 +1551,7 @@ HValue* HGraphBuilder::BuildNewElementsCapacity(HValue* context,
new_capacity = AddInstruction(
HAdd::New(zone, context, new_capacity, min_growth));
- new_capacity->ChangeRepresentation(Representation::Integer32());
+ new_capacity->AssumeRepresentation(Representation::Integer32());
new_capacity->ClearFlag(HValue::kCanOverflow);
return new_capacity;
@@ -1931,7 +1931,7 @@ HValue* HGraphBuilder::JSArrayBuilder::EstablishAllocationSize(
AddInstruction(elements_size_value);
HInstruction* mul = HMul::New(zone(), context, length_node,
elements_size_value);
- mul->ChangeRepresentation(Representation::Integer32());
+ mul->AssumeRepresentation(Representation::Integer32());
mul->ClearFlag(HValue::kCanOverflow);
AddInstruction(mul);
@@ -1939,7 +1939,7 @@ HValue* HGraphBuilder::JSArrayBuilder::EstablishAllocationSize(
Representation::Integer32());
AddInstruction(base);
HInstruction* total_size = HAdd::New(zone(), context, base, mul);
- total_size->ChangeRepresentation(Representation::Integer32());
+ total_size->AssumeRepresentation(Representation::Integer32());
total_size->ClearFlag(HValue::kCanOverflow);
AddInstruction(total_size);
return total_size;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698