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

Unified Diff: src/contexts.h

Issue 1027283004: [es6] do not add caller/arguments to ES6 function definitions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 8 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/builtins.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.h
diff --git a/src/contexts.h b/src/contexts.h
index 3b4b7992c099bbc5f7393fc37d7fa5549284e119..4fe0621e04c5efc4d4234dc509e161cf1fb0d522 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -582,17 +582,16 @@ class Context: public FixedArray {
}
if (IsConstructor(kind)) {
- return is_strong(language_mode) ? STRONG_CONSTRUCTOR_MAP_INDEX :
- is_strict(language_mode) ? STRICT_FUNCTION_MAP_INDEX
- : SLOPPY_FUNCTION_MAP_INDEX;
+ // Use strict function map (no own "caller" / "arguments")
+ return is_strong(language_mode) ? STRONG_CONSTRUCTOR_MAP_INDEX
+ : STRICT_FUNCTION_MAP_INDEX;
}
if (IsArrowFunction(kind) || IsConciseMethod(kind) ||
IsAccessorFunction(kind)) {
- return is_strong(language_mode) ? STRONG_FUNCTION_MAP_INDEX :
- is_strict(language_mode) ?
- STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX :
- SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX;
+ return is_strong(language_mode)
+ ? STRONG_FUNCTION_MAP_INDEX
+ : STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX;
}
return is_strong(language_mode) ? STRONG_FUNCTION_MAP_INDEX :
« no previous file with comments | « src/builtins.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698