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

Unified Diff: src/hydrogen.h

Issue 7216009: Change the handling of stack check on backward branches (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changed stack check elimination to remove the stack check instruction Created 9 years, 6 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/arm/lithium-codegen-arm.cc ('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 c2339e3fc74f338e8b754467ebc2fc589ccc7beb..8f01fe2bdf69a16b5e490e05781c1f96daa71805 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -120,7 +120,7 @@ class HBasicBlock: public ZoneObject {
void Finish(HControlInstruction* last);
void FinishExit(HControlInstruction* instruction);
- void Goto(HBasicBlock* block, bool include_stack_check = false);
+ void Goto(HBasicBlock* block);
int PredecessorIndexOf(HBasicBlock* predecessor) const;
void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); }
@@ -185,7 +185,10 @@ class HBasicBlock: public ZoneObject {
class HLoopInformation: public ZoneObject {
public:
explicit HLoopInformation(HBasicBlock* loop_header)
- : back_edges_(4), loop_header_(loop_header), blocks_(8) {
+ : back_edges_(4),
+ loop_header_(loop_header),
+ blocks_(8),
+ stack_check_(NULL) {
blocks_.Add(loop_header);
}
virtual ~HLoopInformation() {}
@@ -196,12 +199,18 @@ class HLoopInformation: public ZoneObject {
HBasicBlock* GetLastBackEdge() const;
void RegisterBackEdge(HBasicBlock* block);
+ HStackCheck* stack_check() const { return stack_check_; }
+ void set_stack_check(HStackCheck* stack_check) {
+ stack_check_ = stack_check;
+ }
+
private:
void AddBlock(HBasicBlock* block);
ZoneList<HBasicBlock*> back_edges_;
HBasicBlock* loop_header_;
ZoneList<HBasicBlock*> blocks_;
+ HStackCheck* stack_check_;
};
@@ -771,6 +780,9 @@ class HGraphBuilder: public AstVisitor {
void PreProcessOsrEntry(IterationStatement* statement);
// True iff. we are compiling for OSR and the statement is the entry.
bool HasOsrEntryAt(IterationStatement* statement);
+ void VisitLoopBody(Statement* body,
+ HBasicBlock* loop_entry,
+ BreakAndContinueInfo* break_info);
HBasicBlock* CreateJoin(HBasicBlock* first,
HBasicBlock* second,
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698