Reviewers: Yang,
Message:
Disabling optimizations for global eval seems reasonable because of its
dynamic
scope but I don't think that reasoning applies to functions created with the
Function constructor. This CR lifts the restriction.
`make x64.release.quickcheck extrachecks=on` is happy: [08:37|% 100|+ 12048|
-
0]: Done
Description:
compiler: enable optimizer for function literals
Please review this at https://codereview.chromium.org/821553003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -1 lines):
M src/compiler.cc
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
3b52aa2d3b925925b243fe13836641725c1d69d4..59d2fb8b1814f5c47d5dd0d888df7ee64e9478c8
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1238,7 +1238,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
} else {
// Explicitly disable optimization for eval code. We're not yet
prepared
// to handle eval-code in the optimizing compiler.
- shared_info->DisableOptimization(kEval);
+ if (restriction != ONLY_SINGLE_FUNCTION_LITERAL) {
+ shared_info->DisableOptimization(kEval);
+ }
// If caller is strict mode, the result must be in strict mode as
well.
DCHECK(strict_mode == SLOPPY || shared_info->strict_mode() ==
STRICT);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.