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

Unified Diff: src/lithium.h

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion Created 6 years, 3 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/ia32/macro-assembler-ia32.h ('k') | src/lithium.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium.h
diff --git a/src/lithium.h b/src/lithium.h
index 9c3aab0b9e99c8bc2dbfe7bb3a685c38fd655f93..83f760d672b8c1cfb9ec5744b5c2ae096bc9a905 100644
--- a/src/lithium.h
+++ b/src/lithium.h
@@ -8,6 +8,7 @@
#include <set>
#include "src/allocation.h"
+#include "src/bailout-reason.h"
#include "src/hydrogen.h"
#include "src/safepoint-table.h"
#include "src/zone-allocator.h"
@@ -697,13 +698,34 @@ class LChunk : public ZoneObject {
class LChunkBuilderBase BASE_EMBEDDED {
public:
- explicit LChunkBuilderBase(Zone* zone)
+ explicit LChunkBuilderBase(CompilationInfo* info, HGraph* graph)
: argument_count_(0),
- zone_(zone) { }
+ chunk_(NULL),
+ info_(info),
+ graph_(graph),
+ status_(UNUSED),
+ zone_(graph->zone()) {}
virtual ~LChunkBuilderBase() { }
+ void Abort(BailoutReason reason);
+ void Retry(BailoutReason reason);
+
protected:
+ enum Status { UNUSED, BUILDING, DONE, ABORTED };
+
+ LPlatformChunk* chunk() const { return chunk_; }
+ CompilationInfo* info() const { return info_; }
+ HGraph* graph() const { return graph_; }
+ int argument_count() const { return argument_count_; }
+ Isolate* isolate() const { return graph_->isolate(); }
+ Heap* heap() const { return isolate()->heap(); }
+
+ bool is_unused() const { return status_ == UNUSED; }
+ bool is_building() const { return status_ == BUILDING; }
+ bool is_done() const { return status_ == DONE; }
+ bool is_aborted() const { return status_ == ABORTED; }
+
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) = 0;
@@ -718,6 +740,10 @@ class LChunkBuilderBase BASE_EMBEDDED {
Zone* zone() const { return zone_; }
int argument_count_;
+ LPlatformChunk* chunk_;
+ CompilationInfo* info_;
+ HGraph* const graph_;
+ Status status_;
private:
Zone* zone_;
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698