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

Unified Diff: src/hydrogen-instructions.cc

Issue 57123002: Reland 21774: Generate KeyedLoadGeneric with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn off by default Created 7 years, 1 month 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
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index e93d3402037c11d59698db991e77e4c9ba3f0c17..ea0d4f5ba2ffb8d893b0dc491e17534b7fc008fd 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -2659,6 +2659,7 @@ bool HConstant::EmitAtUses() {
if (UseCount() == 0) return true;
if (IsCell()) return false;
if (representation().IsDouble()) return false;
+ if (representation().IsExternal()) return false;
return true;
}
@@ -3130,7 +3131,7 @@ void HLoadKeyed::PrintDataTo(StringStream* stream) {
stream->Add("[");
key()->PrintNameTo(stream);
if (IsDehoisted()) {
- stream->Add(" + %d]", index_offset());
+ stream->Add(" + %d]", base_offset());
} else {
stream->Add("]");
}
@@ -3231,11 +3232,19 @@ HValue* HLoadKeyedGeneric::Canonicalize() {
index_cache,
key_load->key(),
key_load->key(),
- key_load->elements_kind());
+ key_load->elements_kind(),
Toon Verwaest 2013/12/04 17:29:26 Why is this the same elements kind as the array of
danno 2014/06/06 15:43:50 That's beyond the scope of this change, which itse
+ NEVER_RETURN_HOLE,
+ key_load->base_offset());
map_check->InsertBefore(this);
index->InsertBefore(this);
- HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex(
- object(), index);
+ HInstruction* int_index = new(block()->zone()) HChange(
+ index, Representation::Integer32(), false, false);
+ HChange::cast(int_index)->InsertBefore(this);
Toon Verwaest 2013/12/04 17:29:26 So this change is actually (or better, will be) su
danno 2014/06/06 15:43:50 This change is no longer necessary, after unrelate
+ HLoadFieldByIndex* load =
+ HLoadFieldByIndex::New(block()->graph()->zone(),
+ block()->graph()->GetInvalidContext(),
+ object(),
+ int_index);
load->InsertBefore(this);
return load;
}
@@ -3284,7 +3293,7 @@ void HStoreKeyed::PrintDataTo(StringStream* stream) {
stream->Add("[");
key()->PrintNameTo(stream);
if (IsDehoisted()) {
- stream->Add(" + %d] = ", index_offset());
+ stream->Add(" + %d] = ", base_offset());
} else {
stream->Add("] = ");
}

Powered by Google App Engine
This is Rietveld 408576698