Revision: 4680
Author: [email protected]
Date: Wed May 19 02:07:33 2010
Log: IA32: Use the full compiler when debugging
The full compiler will now be used for all code compiler when debugging is
active. As the code generated by the full compiler is much simpler it will
be easier to make debugging work better when using that code.
To ensure that all code debugged is from the full compiler all functions
will have to be recompiled when starting debugging. Initialing debugging
already turns off the code cache.
Review URL: http://codereview.chromium.org/2120009
http://code.google.com/p/v8/source/detail?r=4680
Modified:
/branches/bleeding_edge/src/compiler.cc
/branches/bleeding_edge/src/debug.h
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/test/cctest/test-log-stack-tracer.cc
=======================================
--- /branches/bleeding_edge/src/compiler.cc Wed Apr 28 04:38:43 2010
+++ /branches/bleeding_edge/src/compiler.cc Wed May 19 02:07:33 2010
@@ -120,7 +120,21 @@
? info->scope()->is_global_scope()
: (shared->is_toplevel() || shared->try_full_codegen());
- if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
+ bool force_full_compiler = false;
+#ifdef V8_TARGET_ARCH_IA32
+ // On ia32 the full compiler can compile all code whereas the other
platforms
+ // the constructs supported is checked by the associated syntax checker.
When
+ // --always-full-compiler is used on ia32 the syntax checker is still in
+ // effect, but there is a special flag --force-full-compiler to ignore
the
+ // syntax checker completely and use the full compiler for all code. Also
+ // when debugging on ia32 the full compiler will be used for all code.
+ force_full_compiler =
+ Debugger::IsDebuggerActive() || FLAG_force_full_compiler;
+#endif
+
+ if (force_full_compiler) {
+ return FullCodeGenerator::MakeCode(info);
+ } else if (FLAG_always_full_compiler || (FLAG_full_compiler &&
is_run_once)) {
FullCodeGenSyntaxChecker checker;
checker.Check(function);
if (checker.has_supported_syntax()) {
=======================================
--- /branches/bleeding_edge/src/debug.h Wed Apr 28 02:18:53 2010
+++ /branches/bleeding_edge/src/debug.h Wed May 19 02:07:33 2010
@@ -693,8 +693,9 @@
static void set_loading_debugger(bool v) { is_loading_debugger_ = v; }
static bool is_loading_debugger() { return
Debugger::is_loading_debugger_; }
- private:
static bool IsDebuggerActive();
+
+ private:
static void ListenersChanged();
static Mutex* debugger_access_; // Mutex guarding debugger variables.
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue May 18 09:50:17 2010
+++ /branches/bleeding_edge/src/flag-definitions.h Wed May 19 02:07:33 2010
@@ -149,6 +149,10 @@
DEFINE_bool(fast_compiler, false, "enable speculative optimizing backend")
DEFINE_bool(always_full_compiler, false,
"try to use the dedicated run-once backend for all code")
+#ifdef V8_TARGET_ARCH_IA32
+DEFINE_bool(force_full_compiler, false,
+ "force use of the dedicated run-once backend for all code")
+#endif
DEFINE_bool(always_fast_compiler, false,
"try to use the speculative optimizing backend for all code")
DEFINE_bool(trace_bailout, false,
=======================================
--- /branches/bleeding_edge/test/cctest/test-log-stack-tracer.cc Tue May 18
07:19:33 2010
+++ /branches/bleeding_edge/test/cctest/test-log-stack-tracer.cc Wed May 19
02:07:33 2010
@@ -273,6 +273,13 @@
// StackTracer uses Top::c_entry_fp as a starting point for stack
// walking.
TEST(CFromJSStackTrace) {
+#ifdef V8_HOST_ARCH_IA32
+ // TODO(711) The hack of replacing the inline runtime function
+ // RandomHeapNumber with GetFrameNumber does not work with the way the
full
+ // compiler generates inline runtime calls.
+ i::FLAG_force_full_compiler = false;
+#endif
+
TickSample sample;
InitTraceEnv(&sample);
@@ -308,6 +315,13 @@
// Top::c_entry_fp value. In this case, StackTracer uses passed frame
// pointer value as a starting point for stack walking.
TEST(PureJSStackTrace) {
+#ifdef V8_HOST_ARCH_IA32
+ // TODO(711) The hack of replacing the inline runtime function
+ // RandomHeapNumber with GetFrameNumber does not work with the way the
full
+ // compiler generates inline runtime calls.
+ i::FLAG_force_full_compiler = false;
+#endif
+
TickSample sample;
InitTraceEnv(&sample);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev