Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 3b4b7992c099bbc5f7393fc37d7fa5549284e119..3862f0c631119789b02b1b39cd5b350a66ddc986 100644 |
--- a/src/contexts.h |
+++ b/src/contexts.h |
@@ -582,17 +582,18 @@ 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 |
+ : is_strict(language_mode) || !IsAccessorFunction(kind) |
arv (Not doing code reviews)
2015/04/07 16:18:39
I don't understand why accessor functions are spec
caitp (gmail)
2015/04/07 16:29:57
It was to avoid breaking the old behaviour.
But I
arv (Not doing code reviews)
2015/04/07 17:00:11
Accessors are considered Methods in ES6 so they ha
caitp (gmail)
2015/04/07 17:10:36
Oh I see what you're saying. So I guess I was tryi
arv (Not doing code reviews)
2015/04/07 18:22:03
I think sloppy accessors should be treated as slop
|
+ ? STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX |
+ : SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX; |
} |
return is_strong(language_mode) ? STRONG_FUNCTION_MAP_INDEX : |