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

Unified Diff: src/hydrogen-osr.cc

Issue 21356002: Improve instruction creating/adding shorthand in HGraphBuilder (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« src/hydrogen-instructions.cc ('K') | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-osr.cc
diff --git a/src/hydrogen-osr.cc b/src/hydrogen-osr.cc
index 6c3d6ae3e02be1c8dcf47611b16eb04845dc6957..271e69a2097fd55860e57a8352fd82ad0ad3f874 100644
--- a/src/hydrogen-osr.cc
+++ b/src/hydrogen-osr.cc
@@ -80,7 +80,7 @@ HBasicBlock* HOsrBuilder::BuildPossibleOsrLoopEntry(
osr_values_ = new(zone) ZoneList<HUnknownOSRValue*>(length, zone);
for (int i = 0; i < first_expression_index; ++i) {
- HUnknownOSRValue* osr_value = builder_->Add<HUnknownOSRValue>();
+ HUnknownOSRValue* osr_value = builder_->AddAndCast<HUnknownOSRValue>();
environment->Bind(i, osr_value);
osr_values_->Add(osr_value, zone);
}
@@ -88,7 +88,7 @@ HBasicBlock* HOsrBuilder::BuildPossibleOsrLoopEntry(
if (first_expression_index != length) {
environment->Drop(length - first_expression_index);
for (int i = first_expression_index; i < length; ++i) {
- HUnknownOSRValue* osr_value = builder_->Add<HUnknownOSRValue>();
+ HUnknownOSRValue* osr_value = builder_->AddAndCast<HUnknownOSRValue>();
environment->Push(osr_value);
osr_values_->Add(osr_value, zone);
}
@@ -96,7 +96,7 @@ HBasicBlock* HOsrBuilder::BuildPossibleOsrLoopEntry(
builder_->Add<HSimulate>(osr_entry_id);
builder_->Add<HOsrEntry>(osr_entry_id);
- HContext* context = builder_->Add<HContext>();
+ HContext* context = builder_->AddAndCast<HContext>();
environment->BindContext(context);
builder_->current_block()->Goto(loop_predecessor);
loop_predecessor->SetJoinId(statement->EntryId());
« src/hydrogen-instructions.cc ('K') | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698