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

Unified Diff: src/hydrogen.h

Issue 11365174: A change in the way we place TransitionElementKinds in the tree. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Now includes optimization of codegen for transition elementskind instruction Created 8 years 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/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 98b05d147a290d67e10cbe57daae8bc2f73b02ea..1afb71fb5813f2957e0e9801db4e03ceca549276 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -91,6 +91,8 @@ class HBasicBlock: public ZoneObject {
void set_last_instruction_index(int index) {
last_instruction_index_ = index;
}
+ bool is_osr_entry() { return is_osr_entry_; }
+ void set_osr_entry() { is_osr_entry_ = true; }
void AttachLoopInformation();
void DetachLoopInformation();
@@ -193,6 +195,7 @@ class HBasicBlock: public ZoneObject {
bool is_inline_return_target_;
bool is_deoptimizing_;
bool dominates_loop_successors_;
+ bool is_osr_entry_;
};
@@ -242,6 +245,7 @@ class HLoopInformation: public ZoneObject {
HStackCheck* stack_check_;
};
+
class BoundsCheckTable;
class HGraph: public ZoneObject {
public:
@@ -370,6 +374,18 @@ class HGraph: public ZoneObject {
uint32_instructions_->Add(instr, zone());
}
+ HArrayInstruction* RecordArrayInstruction(HArrayInstruction* instr) {
+ if (array_instructions_ == NULL) {
+ array_instructions_ = new(zone()) ZoneList<HArrayInstruction*>(4, zone());
+ }
+ array_instructions_->Add(instr, zone());
+ return instr;
+ }
+
+ ZoneList<HArrayInstruction*>* array_instructions() {
+ return array_instructions_;
+ }
+
private:
HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
Handle<Object> value);
@@ -377,6 +393,7 @@ class HGraph: public ZoneObject {
int32_t integer_value);
void MarkAsDeoptimizingRecursively(HBasicBlock* block);
+ void InsertElementsTransitions();
void InsertTypeConversions(HInstruction* instr);
void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
@@ -398,6 +415,7 @@ class HGraph: public ZoneObject {
ZoneList<HValue*> values_;
ZoneList<HPhi*>* phi_list_;
ZoneList<HInstruction*>* uint32_instructions_;
+ ZoneList<HArrayInstruction*>* array_instructions_;
SetOncePointer<HConstant> undefined_constant_;
SetOncePointer<HConstant> constant_1_;
SetOncePointer<HConstant> constant_minus1_;
@@ -1139,31 +1157,31 @@ class HGraphBuilder: public AstVisitor {
HValue* right);
HInstruction* BuildIncrement(bool returns_original_input,
CountOperation* expr);
- HInstruction* BuildFastElementAccess(HValue* elements,
- HValue* checked_key,
- HValue* val,
- HValue* dependency,
- ElementsKind elements_kind,
- bool is_store);
-
- HInstruction* TryBuildConsolidatedElementLoad(HValue* object,
- HValue* key,
- HValue* val,
- SmallMapList* maps);
-
- HInstruction* BuildUncheckedMonomorphicElementAccess(HValue* object,
- HValue* key,
- HValue* val,
- HCheckMaps* mapcheck,
- Handle<Map> map,
- bool is_store);
-
- HInstruction* BuildMonomorphicElementAccess(HValue* object,
- HValue* key,
- HValue* val,
- HValue* dependency,
- Handle<Map> map,
- bool is_store);
+ HArrayInstruction* BuildFastElementAccess(HValue* elements,
+ HValue* checked_key,
+ HValue* val,
+ HValue* dependency,
+ ElementsKind elements_kind,
+ bool is_store);
+
+ HArrayInstruction* TryBuildConsolidatedElementLoad(HValue* object,
+ HValue* key,
+ HValue* val,
+ SmallMapList* maps);
+
+ HArrayInstruction* BuildUncheckedMonomorphicElementAccess(HValue* object,
+ HValue* key,
+ HValue* val,
+ HCheckMaps* mapcheck,
+ Handle<Map> map,
+ bool is_store);
+
+ HArrayInstruction* BuildMonomorphicElementAccess(HValue* object,
+ HValue* key,
+ HValue* val,
+ HValue* dependency,
+ Handle<Map> map,
+ bool is_store);
HValue* HandlePolymorphicElementAccess(HValue* object,
HValue* key,
@@ -1198,7 +1216,7 @@ class HGraphBuilder: public AstVisitor {
Property* expr,
Handle<Map> map);
HInstruction* BuildLoadKeyedGeneric(HValue* object, HValue* key);
- HInstruction* BuildExternalArrayElementAccess(
+ HArrayInstruction* BuildExternalArrayElementAccess(
HValue* external_elements,
HValue* checked_key,
HValue* val,
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698