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
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4680
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
? 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()) {
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.
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,
// 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);
// 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);