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

Unified Diff: src/hydrogen.h

Issue 12221064: Implement many KeyedStoreStubs using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 9 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
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index b3a056fa1b35d2f2c04b98d8a3e1f84f31080b05..fb8545404ce4dde2db15d1c87fca978eee2a67f9 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -298,6 +298,7 @@ class HGraph: public ZoneObject {
HConstant* GetConstantUndefined() const { return undefined_constant_.get(); }
HConstant* GetConstant0();
HConstant* GetConstant1();
+ HConstant* GetConstant2();
HConstant* GetConstantMinus1();
HConstant* GetConstantTrue();
HConstant* GetConstantFalse();
@@ -419,6 +420,7 @@ class HGraph: public ZoneObject {
SetOncePointer<HConstant> undefined_constant_;
SetOncePointer<HConstant> constant_0_;
SetOncePointer<HConstant> constant_1_;
+ SetOncePointer<HConstant> constant_2_;
SetOncePointer<HConstant> constant_minus1_;
SetOncePointer<HConstant> constant_true_;
SetOncePointer<HConstant> constant_false_;
@@ -892,6 +894,8 @@ class HGraphBuilder {
HBasicBlock* CreateBasicBlock(HEnvironment* env);
HBasicBlock* CreateLoopHeaderBlock();
+ void AddSoftDeoptimize();
+
// Building common constructs
HInstruction* BuildExternalArrayElementAccess(
HValue* external_elements,
@@ -907,7 +911,20 @@ class HGraphBuilder {
HValue* val,
HValue* dependency,
ElementsKind elements_kind,
- bool is_store);
+ bool is_store,
+ KeyedAccessStoreMode store_mode);
+
+ HValue* BuildCheckForCapacityGrow(HValue* object,
+ HValue* elements,
+ ElementsKind kind,
+ HValue* length,
+ HValue* key,
+ bool is_js_array);
+
+ HValue* BuildCopyElementsOnWrite(HValue* object,
+ HValue* elements,
+ ElementsKind kind,
+ HValue* length);
HInstruction* BuildUncheckedMonomorphicElementAccess(
HValue* object,
@@ -917,6 +934,7 @@ class HGraphBuilder {
bool is_js_array,
ElementsKind elements_kind,
bool is_store,
+ KeyedAccessStoreMode store_mode,
Representation checked_index_representation = Representation::None());
HInstruction* BuildStoreMap(HValue* object, HValue* map, BailoutId id);
@@ -950,12 +968,15 @@ class HGraphBuilder {
if (!finished_) End();
}
- HInstruction* BeginTrue(
+ HInstruction* BeginIf(
HValue* left,
HValue* right,
Token::Value token,
Representation input_representation = Representation::Integer32());
- void BeginFalse();
+ HInstruction* BeginIfObjectsEqual(
+ HValue* left,
+ HValue* right);
+ void BeginElse();
void End();
private:
@@ -1009,16 +1030,39 @@ class HGraphBuilder {
bool finished_;
};
- HValue* BuildAllocateElements(HContext* context,
- ElementsKind kind,
- HValue* capacity);
+ HValue* BuildNewElementsCapacity(HValue* context,
+ HValue* old_capacity);
+
+ void BuildNewSpaceArrayCheck(HValue* length,
+ ElementsKind kind);
- void BuildCopyElements(HContext* context,
+ HValue* BuildAllocateElements(HValue* context,
+ ElementsKind kind,
+ HValue* capacity,
+ BailoutId ast_id);
+
+ HValue* BuildGrowElementsCapacity(HValue* object,
+ HValue* elements,
+ ElementsKind kind,
+ HValue* length,
+ HValue* new_capacity,
+ BailoutId ast_id);
+
+ void BuildFillElementsWithHole(HValue* context,
+ HValue* elements,
+ ElementsKind elements_kind,
+ HValue* from,
+ HValue* to,
+ BailoutId ast_id);
+
+ void BuildCopyElements(HValue* context,
HValue* from_elements,
ElementsKind from_elements_kind,
HValue* to_elements,
ElementsKind to_elements_kind,
- HValue* length);
+ HValue* length,
+ HValue* capacity,
+ BailoutId ast_id);
private:
HGraphBuilder();
@@ -1095,8 +1139,6 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
bool inline_bailout() { return inline_bailout_; }
- void AddSoftDeoptimize();
-
// Bailout environment manipulation.
void Push(HValue* value) { environment()->Push(value); }
HValue* Pop() { return environment()->Pop(); }
@@ -1346,7 +1388,8 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
HValue* val,
HValue* dependency,
Handle<Map> map,
- bool is_store);
+ bool is_store,
+ KeyedAccessStoreMode store_mode);
HValue* HandlePolymorphicElementAccess(HValue* object,
HValue* key,
@@ -1355,6 +1398,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
BailoutId ast_id,
int position,
bool is_store,
+ KeyedAccessStoreMode store_mode,
bool* has_side_effects);
HValue* HandleKeyedElementAccess(HValue* obj,

Powered by Google App Engine
This is Rietveld 408576698