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

Unified Diff: src/compiler.cc

Issue 3107033: Remove the full codegen syntax checker completely but be... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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/ast.h ('k') | src/full-codegen.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 5323)
+++ src/compiler.cc (working copy)
@@ -104,15 +104,9 @@
bool is_run_once = (shared.is_null())
? info->scope()->is_global_scope()
: (shared->is_toplevel() || shared->try_full_codegen());
-
- if (AlwaysFullCompiler()) {
+ bool use_full = FLAG_full_compiler && !function->contains_loops();
+ if (AlwaysFullCompiler() || (use_full && is_run_once)) {
return FullCodeGenerator::MakeCode(info);
- } else if (FLAG_full_compiler && is_run_once) {
- FullCodeGenSyntaxChecker checker;
- checker.Check(function);
- if (checker.has_supported_syntax()) {
- return FullCodeGenerator::MakeCode(info);
- }
}
AssignedVariablesAnalyzer ava(function);
@@ -476,21 +470,10 @@
CompilationInfo info(literal, script, false);
bool is_run_once = literal->try_full_codegen();
- bool is_compiled = false;
-
- if (AlwaysFullCompiler()) {
+ bool use_full = FLAG_full_compiler && !literal->contains_loops();
+ if (AlwaysFullCompiler() || (use_full && is_run_once)) {
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()) {
- code = FullCodeGenerator::MakeCode(&info);
- is_compiled = true;
- }
- }
-
- if (!is_compiled) {
+ } else {
// We fall back to the classic V8 code generator.
AssignedVariablesAnalyzer ava(literal);
if (!ava.Analyze()) return Handle<SharedFunctionInfo>::null();
« no previous file with comments | « src/ast.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698