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

Unified Diff: src/v8.cc

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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/v8.h ('k') | src/v8-counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index 89ff69925fde57027025794b6adfb059aba6746e..047fefeb6b7dafa1d4e20acb31250a904c551ff0 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -27,15 +27,8 @@
#include "v8.h"
-#include "bootstrapper.h"
-#include "debug.h"
#include "isolate.h"
#include "serialize.h"
-#include "simulator.h"
-#include "stub-cache.h"
-#include "heap-profiler.h"
-#include "oprofile-agent.h"
-#include "log.h"
namespace v8 {
namespace internal {
@@ -44,6 +37,7 @@ bool V8::is_running_ = false;
bool V8::has_been_setup_ = false;
bool V8::has_been_disposed_ = false;
bool V8::has_fatal_error_ = false;
+bool V8::use_crankshaft_ = true;
bool V8::Initialize(Deserializer* des) {
@@ -61,18 +55,19 @@ bool V8::Initialize(Deserializer* des) {
ASSERT(i::Isolate::CurrentPerIsolateThreadData()->isolate() ==
i::Isolate::Current());
+ if (IsDead()) return false;
+
Isolate* isolate = Isolate::Current();
- if (isolate->IsDefaultIsolate()) {
- if (has_been_disposed_ || has_fatal_error_) return false;
- if (IsRunning()) return true;
-
- is_running_ = true;
- has_been_setup_ = true;
- has_fatal_error_ = false;
- has_been_disposed_ = false;
- } else {
- if (isolate->IsInitialized()) return true;
- }
+ if (isolate->IsInitialized()) return true;
+
+ use_crankshaft_ = FLAG_crankshaft;
+ // Peephole optimization might interfere with deoptimization.
+ FLAG_peephole_optimization = !use_crankshaft_;
+
+ is_running_ = true;
+ has_been_setup_ = true;
+ has_fatal_error_ = false;
+ has_been_disposed_ = false;
return isolate->Init(des);
}
« no previous file with comments | « src/v8.h ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698