Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 10686) |
+++ src/compiler.cc (working copy) |
@@ -61,7 +61,7 @@ |
extension_(NULL), |
pre_parse_data_(NULL), |
osr_ast_id_(AstNode::kNoNumber) { |
- Initialize(NONOPT); |
+ Initialize(BASE); |
} |
@@ -182,10 +182,8 @@ |
static bool MakeCrankshaftCode(CompilationInfo* info) { |
// Test if we can optimize this function when asked to. We can only |
// do this after the scopes are computed. |
- if (!info->AllowOptimize()) { |
+ if (!V8::UseCrankshaft()) { |
info->DisableOptimization(); |
- } else if (info->IsOptimizable()) { |
- info->EnableDeoptimizationSupport(); |
} |
// In case we are not optimizing simply return the code from |
@@ -664,11 +662,13 @@ |
// Check the function has compiled code. |
ASSERT(shared->is_compiled()); |
shared->set_code_age(0); |
- shared->set_dont_crankshaft(lit->flags()->Contains(kDontOptimize)); |
+ shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
shared->set_dont_inline(lit->flags()->Contains(kDontInline)); |
shared->set_ast_node_count(lit->ast_node_count()); |
- if (info->AllowOptimize() && !shared->optimization_disabled()) { |
+ if (V8::UseCrankshaft()&& |
+ !function.is_null() && |
+ !shared->optimization_disabled()) { |
// If we're asked to always optimize, we compile the optimized |
// version of the function right away - unless the debugger is |
// active as it makes no sense to compile optimized code then. |
@@ -766,7 +766,8 @@ |
function_info->set_uses_arguments(lit->scope()->arguments() != NULL); |
function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); |
function_info->set_ast_node_count(lit->ast_node_count()); |
- function_info->set_dont_crankshaft(lit->flags()->Contains(kDontOptimize)); |
+ function_info->set_is_function(lit->is_function()); |
+ function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
function_info->set_dont_inline(lit->flags()->Contains(kDontInline)); |
} |