Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 77ff09c464ea7f14872b811536dba50fdae23999..2a1657f51e2de02871d1924c9d92cc167bf73686 100644 |
--- a/src/contexts.h |
+++ b/src/contexts.h |
@@ -324,6 +324,7 @@ enum ContextLookupFlags { |
V(STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \ |
strict_function_without_prototype_map) \ |
V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ |
+ V(CLASS_FUNCTION_MAP_INDEX, Map, class_function_map) \ |
V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ |
V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ |
V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ |
@@ -616,8 +617,10 @@ class Context: public FixedArray { |
} |
if (IsClassConstructor(kind)) { |
- // Use strict function map (no own "caller" / "arguments") |
- return STRICT_FUNCTION_MAP_INDEX; |
+ // Like the strict function map, but with no 'name' accessor. 'name' |
+ // needs to be the last property and it is added during instantiation, |
+ // in case a static property with the same name exists" |
+ return CLASS_FUNCTION_MAP_INDEX; |
} |
if (IsArrowFunction(kind) || IsConciseMethod(kind) || |