Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 721d6699a81f5a8940e4f53c642c52e2a7028c8c..86406e5a09756da95984c740bd60b258c1fd12c3 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) \ |
@@ -258,6 +259,7 @@ class Context: public FixedArray { |
FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, |
STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, |
INITIAL_OBJECT_PROTOTYPE_INDEX, |
+ INITIAL_ARRAY_PROTOTYPE_INDEX, |
BOOLEAN_FUNCTION_INDEX, |
NUMBER_FUNCTION_INDEX, |
STRING_FUNCTION_INDEX, |
@@ -429,6 +431,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)); \ |