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

Unified Diff: src/compiler.cc

Issue 2163006: ARM: Update the full compiler to handle all code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/arm/full-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 4715)
+++ src/compiler.cc (working copy)
@@ -44,7 +44,19 @@
namespace v8 {
namespace internal {
+// For normal operation the syntax checker is used to determine whether to
+// use the full compiler for top level code or not. However if the flag
+// --always-full-compiler is specified or debugging is active the full
+// compiler will be used for all code.
+static bool AlwaysFullCompiler() {
+#ifdef ENABLE_DEBUGGER_SUPPORT
+ return FLAG_always_full_compiler || Debugger::IsDebuggerActive();
+#else
+ return FLAG_always_full_compiler;
+#endif
+}
+
static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) {
FunctionLiteral* function = info->function();
ASSERT(function != NULL);
@@ -120,21 +132,9 @@
? info->scope()->is_global_scope()
: (shared->is_toplevel() || shared->try_full_codegen());
- bool force_full_compiler = false;
-#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64)
- // 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) {
+ if (AlwaysFullCompiler()) {
return FullCodeGenerator::MakeCode(info);
- } else if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
+ } else if (FLAG_full_compiler && is_run_once) {
FullCodeGenSyntaxChecker checker;
checker.Check(function);
if (checker.has_supported_syntax()) {
@@ -521,7 +521,11 @@
CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler);
bool is_run_once = literal->try_full_codegen();
bool is_compiled = false;
- if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
+
+ if (AlwaysFullCompiler()) {
+ code = FullCodeGenerator::MakeCode(&info);
+ is_compiled = true;
+ } else if (FLAG_full_compiler && is_run_once) {
FullCodeGenSyntaxChecker checker;
checker.Check(literal);
if (checker.has_supported_syntax()) {
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698