Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 434b274147e1920fad6314d38e133c94476aabcf..6e241f171fdb5c7b76eb6fac5394356d38cefcc7 100644 |
--- a/src/contexts.h |
+++ b/src/contexts.h |
@@ -112,6 +112,7 @@ enum BindingFlags { |
V(JSON_OBJECT_INDEX, JSObject, json_object) \ |
V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ |
V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ |
+ V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \ |
V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \ |
V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ |
V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \ |
@@ -263,6 +264,7 @@ class Context: public FixedArray { |
FUNCTION_INSTANCE_MAP_INDEX, |
STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, |
INITIAL_OBJECT_PROTOTYPE_INDEX, |
+ INITIAL_ARRAY_PROTOTYPE_INDEX, |
BOOLEAN_FUNCTION_INDEX, |
NUMBER_FUNCTION_INDEX, |
STRING_FUNCTION_INDEX, |
@@ -434,6 +436,10 @@ class Context: public FixedArray { |
ASSERT(IsNativeContext()); \ |
set(index, value); \ |
} \ |
+ bool is_##name(type* value) { \ |
+ ASSERT(IsNativeContext()); \ |
+ return type::cast(get(index)) == value; \ |
+ } \ |
type* name() { \ |
ASSERT(IsNativeContext()); \ |
return type::cast(get(index)); \ |