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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 148153010: Synchronize with r15701. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index d8eaae019076f0d09111882c53849433b1d7ee73..9ea87abb54641383d35fc7df8d2b7fe1f1a01af9 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -541,21 +541,23 @@ HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() {
Add<HTrapAllocationMemento>(js_array);
}
- HInstruction* array_length =
- AddLoad(js_array, HObjectAccess::ForArrayLength());
- array_length->set_type(HType::Smi());
+ HInstruction* elements = AddLoadElements(js_array);
+
+ HInstruction* empty_fixed_array = Add<HConstant>(
+ isolate()->factory()->empty_fixed_array(), Representation::Tagged());
IfBuilder if_builder(this);
- if_builder.IfNot<HCompareNumericAndBranch>(array_length,
- graph()->GetConstant0(),
- Token::EQ);
- if_builder.Then();
+ if_builder.IfNot<HCompareObjectEqAndBranch>(elements, empty_fixed_array);
- HInstruction* elements = AddLoadElements(js_array);
+ if_builder.Then();
HInstruction* elements_length = AddLoadFixedArrayLength(elements);
+ HInstruction* array_length = AddLoad(
+ js_array, HObjectAccess::ForArrayLength(), NULL, Representation::Smi());
+ array_length->set_type(HType::Smi());
+
BuildGrowElementsCapacity(js_array, elements, from_kind, to_kind,
array_length, elements_length);
@@ -784,8 +786,7 @@ HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
CompareNilICStub* stub = casted_stub();
HIfContinuation continuation;
Handle<Map> sentinel_map(isolate->heap()->meta_map());
- Handle<Type> type =
- CompareNilICStub::StateToType(isolate, stub->GetState(), sentinel_map);
+ Handle<Type> type = stub->GetType(isolate, sentinel_map);
BuildCompareNil(GetParameter(0), type, RelocInfo::kNoPosition, &continuation);
IfBuilder if_nil(this, &continuation);
if_nil.Then();
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698