Reviewers: Søren Gjesse,
Description:
Fix compilation with debuggersupport=off.
Please review this at http://codereview.chromium.org/6901026/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/compiler.cc
M src/isolate.h
M src/isolate.cc
M src/liveedit.cc
M src/objects-printer.cc
M src/runtime-profiler.cc
M src/runtime.cc
M src/v8.h
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
0efdeb2f57e9e0a9035af48e7c9bf1a65547118f..16250af86776bc4b1cb7f29ea7f55992a37489b4
100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -664,7 +664,7 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
// version of the function right away - unless the debugger is
// active as it makes no sense to compile optimized code then.
if (FLAG_always_opt &&
- !Isolate::Current()->debug()->has_break_points()) {
+ !Isolate::Current()->DebuggerHasBreakPoints()) {
CompilationInfo optimized(function);
optimized.SetOptimizing(AstNode::kNoNumber);
return CompileLazy(&optimized);
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index
e42d78ecdcba94ca9355b69b201fdbbf0fcbe092..298d2e6547df21f2adf450a2975ee7fd0a4c9356
100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -327,10 +327,12 @@ void Isolate::EnsureDefaultIsolate() {
}
+#ifdef ENABLE_DEBUGGER_SUPPORT
Debugger* Isolate::GetDefaultIsolateDebugger() {
EnsureDefaultIsolate();
return default_isolate_->debugger();
}
+#endif
StackGuard* Isolate::GetDefaultIsolateStackGuard() {
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index
35ffcb4445cf594546b62f12bac74a7afb3025b1..1706b4867ce88901fe0d87708975e31f2b0d4667
100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -294,7 +294,6 @@ class HashMap;
#ifdef ENABLE_DEBUGGER_SUPPORT
#define
ISOLATE_DEBUGGER_INIT_LIST(V) \
- V(uint64_t, enabled_cpu_features,
0) \
V(v8::Debug::EventCallback, debug_event_callback,
NULL) \
V(DebuggerAgent*, debugger_agent_instance, NULL)
#else
@@ -370,6 +369,7 @@ typedef List<HeapObject*, PreallocatedStorage>
DebugObjectCache;
V(unsigned, ast_node_count,
0) \
/* SafeStackFrameIterator activations count.
*/ \
V(int, safe_stack_iterator_counter,
0) \
+ V(uint64_t, enabled_cpu_features,
0) \
ISOLATE_PLATFORM_INIT_LIST(V)
\
ISOLATE_LOGGING_INIT_LIST(V)
\
ISOLATE_DEBUGGER_INIT_LIST(V)
@@ -486,9 +486,11 @@ class Isolate {
// Safe to call multiple times.
static void EnsureDefaultIsolate();
+#ifdef ENABLE_DEBUGGER_SUPPORT
// Get the debugger from the default isolate. Preinitializes the
// default isolate if needed.
static Debugger* GetDefaultIsolateDebugger();
+#endif
// Get the stack guard from the default isolate. Preinitializes the
// default isolate if needed.
@@ -912,6 +914,8 @@ class Isolate {
Debug* debug() { return debug_; }
#endif
+ inline bool DebuggerHasBreakPoints();
+
#ifdef ENABLE_LOGGING_AND_PROFILING
ProducerHeapProfile* producer_heap_profile() {
return producer_heap_profile_;
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index
14667660ad8088370ec3e7670879d1caae949c10..42724cb5ba0c9431f69f59e655d263f389a8f303
100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1682,7 +1682,7 @@ void
LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) {
}
-bool LiveEditFunctionTracker::IsActive() {
+bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
return false;
}
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index
ac5e2045fb0720c9dd66386fdd488904d6247315..b26fd23ce43d3187b80cb439255c9751b7a2bb12
100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -419,8 +419,8 @@ static const char* TypeToString(InstanceType type) {
#define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
STRUCT_LIST(MAKE_STRUCT_CASE)
#undef MAKE_STRUCT_CASE
+ default: return "UNKNOWN";
}
- return "UNKNOWN";
}
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index
8d258acef04d7f63eb84258ca3cbb1bf23a73848..ce9a3082363d1966fd7a934b6cece51c44224059
100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -171,7 +171,7 @@ void
RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) {
// Debug::has_break_points().
ASSERT(function->IsMarkedForLazyRecompilation());
if (!FLAG_use_osr ||
- isolate_->debug()->has_break_points() ||
+ isolate_->DebuggerHasBreakPoints() ||
function->IsBuiltin()) {
return;
}
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
ae2693efdaca3b1b8b3f512990cd8a5019665c2a..d8aaf718097616ae83cc35fa1e9d56121774ea48
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7298,13 +7298,13 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_LazyRecompile) {
// If the function is not optimizable or debugger is active continue
using the
// code from the full compiler.
if (!function->shared()->code()->optimizable() ||
- isolate->debug()->has_break_points()) {
+ isolate->DebuggerHasBreakPoints()) {
if (FLAG_trace_opt) {
PrintF("[failed to optimize ");
function->PrintName();
PrintF(": is code optimizable: %s, is debugger enabled: %s]\n",
function->shared()->code()->optimizable() ? "T" : "F",
- isolate->debug()->has_break_points() ? "T" : "F");
+ isolate->DebuggerHasBreakPoints() ? "T" : "F");
}
function->ReplaceCode(function->shared()->code());
return function->code();
Index: src/v8.h
diff --git a/src/v8.h b/src/v8.h
index
776fa9c2be51db5d75f9add7fc6c4698151b3c5f..9d985213dee44cca88691c5c1aba92675eff01ea
100644
--- a/src/v8.h
+++ b/src/v8.h
@@ -66,6 +66,7 @@
#include "log-inl.h"
#include "cpu-profiler-inl.h"
#include "handles-inl.h"
+#include "isolate-inl.h"
namespace v8 {
namespace internal {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev