Review URL: http://codereview.chromium.org/8611003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10040
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
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()) info->DisableOptimization();
+ if (!info->AllowOptimize()) {
+ info->DisableOptimization();
+ } else if (info->IsOptimizable()) {
+ info->EnableDeoptimizationSupport();
+ }
// In case we are not optimizing simply return the code from
// the full code generator.