Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 11446) |
+++ src/runtime.cc (working copy) |
@@ -8316,10 +8316,13 @@ |
if (!V8::UseCrankshaft()) { |
return Smi::FromInt(4); // 4 == "never". |
} |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
if (FLAG_always_opt) { |
- return Smi::FromInt(3); // 3 == "always". |
+ // We may have always opt, but that is more best-effort than a real |
+ // promise, so we still say "no" if it is not optimized. |
+ return function->IsOptimized() ? Smi::FromInt(3) // 1 == "always". |
Yang
2012/04/26 13:42:20
Should the comment be '3 == "always"'?
Erik Corry
2012/04/26 13:46:10
Done.
|
+ : Smi::FromInt(2); // 2 == "no". |
} |
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". |
: Smi::FromInt(2); // 2 == "no". |
} |