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

Unified Diff: src/hydrogen-bch.cc

Issue 21356002: Improve instruction creating/adding shorthand in HGraphBuilder (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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
« no previous file with comments | « src/hydrogen-bce.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-bch.cc
diff --git a/src/hydrogen-bch.cc b/src/hydrogen-bch.cc
index 8646747caf044a49841fb11d8046468fa23c2e2a..137d6295477f320bd6cd54327d97813a0f7b2405 100644
--- a/src/hydrogen-bch.cc
+++ b/src/hydrogen-bch.cc
@@ -278,10 +278,12 @@ class InductionVariableBlocksTable BASE_EMBEDDED {
}
// Choose the appropriate limit.
+ Zone* zone = graph()->zone();
+ HValue* context = graph()->GetInvalidContext();
HValue* limit = data->limit();
if (has_upper_constant_limit) {
- HConstant* new_limit = new(pre_header->graph()->zone()) HConstant(
- upper_constant_limit, length->representation());
+ HConstant* new_limit = HConstant::New(zone, context,
+ upper_constant_limit);
new_limit->InsertBefore(pre_header->end());
limit = new_limit;
}
@@ -290,15 +292,15 @@ class InductionVariableBlocksTable BASE_EMBEDDED {
if (limit->IsInteger32Constant() &&
limit->block() != pre_header &&
!limit->block()->Dominates(pre_header)) {
- HConstant* new_limit = new(pre_header->graph()->zone()) HConstant(
- limit->GetInteger32Constant(), length->representation());
+ HConstant* new_limit = HConstant::New(zone, context,
+ limit->GetInteger32Constant());
new_limit->InsertBefore(pre_header->end());
limit = new_limit;
}
// Do the hoisting.
- HBoundsCheck* hoisted_check = new(pre_header->zone()) HBoundsCheck(
- limit, check->check()->length());
+ HBoundsCheck* hoisted_check = HBoundsCheck::New(
+ zone, context, limit, check->check()->length());
hoisted_check->InsertBefore(pre_header->end());
hoisted_check->set_allow_equality(true);
hoisted_check->block()->graph()->isolate()->counters()->
« no previous file with comments | « src/hydrogen-bce.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698