Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index b3a056fa1b35d2f2c04b98d8a3e1f84f31080b05..c9f08c33bf94a8e34bceb28b9204ff4779a7f909 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -419,6 +419,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_; |
@@ -907,7 +908,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 +931,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); |
@@ -929,8 +944,9 @@ class HGraphBuilder { |
if (!finished_) End(); |
} |
- void CheckNotUndefined(HValue* value); |
- void CheckIntegerEq(HValue* left, HValue* right); |
+ HValue* CheckNotUndefined(HValue* value); |
+ HValue* CheckIntegerCompare(HValue* left, HValue* right, Token::Value op); |
+ HValue* CheckIntegerEq(HValue* left, HValue* right); |
void End(); |
private: |
@@ -950,12 +966,14 @@ 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); |
+ HInstruction* BeginIfMapsEqual(HValue* value, Handle<Map> map); |
Jakob Kummerow
2013/03/14 15:00:20
nit: "BeginIfMapEquals" would be a bit more accura
danno
2013/03/20 10:04:34
Done.
|
+ void BeginElse(); |
void End(); |
private: |
@@ -963,6 +981,7 @@ class HGraphBuilder { |
HGraphBuilder* builder_; |
bool finished_; |
+ bool did_else_; |
HBasicBlock* first_true_block_; |
HBasicBlock* last_true_block_; |
HBasicBlock* first_false_block_; |
@@ -1009,16 +1028,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(); |
@@ -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, |