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

Unified Diff: src/lithium.cc

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/lithium.h ('k') | src/lithium-codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index b29a4c590c13e49ab197a4f8c2e28c532fe33eff..655a135fed9391ed693d9e67f65e4a26c8a70d68 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -4,6 +4,7 @@
#include "src/v8.h"
+#include "src/bailout-reason.h"
#include "src/lithium.h"
#include "src/scopes.h"
#include "src/serialize.h"
@@ -437,7 +438,7 @@ LChunk* LChunk::NewChunk(HGraph* graph) {
int values = graph->GetMaximumValueID();
CompilationInfo* info = graph->info();
if (values > LUnallocated::kMaxVirtualRegisters) {
- info->set_bailout_reason(kNotEnoughVirtualRegistersForValues);
+ info->AbortOptimization(kNotEnoughVirtualRegistersForValues);
return NULL;
}
LAllocator allocator(values, graph);
@@ -446,7 +447,7 @@ LChunk* LChunk::NewChunk(HGraph* graph) {
if (chunk == NULL) return NULL;
if (!allocator.Allocate(chunk)) {
- info->set_bailout_reason(kNotEnoughVirtualRegistersRegalloc);
+ info->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
return NULL;
}
@@ -510,6 +511,18 @@ void LChunk::set_allocated_double_registers(BitVector* allocated_registers) {
}
+void LChunkBuilderBase::Abort(BailoutReason reason) {
+ info()->AbortOptimization(reason);
+ status_ = ABORTED;
+}
+
+
+void LChunkBuilderBase::Retry(BailoutReason reason) {
+ info()->RetryOptimization(reason);
+ status_ = ABORTED;
+}
+
+
LEnvironment* LChunkBuilderBase::CreateEnvironment(
HEnvironment* hydrogen_env, int* argument_index_accumulator,
ZoneList<HValue*>* objects_to_materialize) {
« no previous file with comments | « src/lithium.h ('k') | src/lithium-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698