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

Unified Diff: src/contexts.h

Issue 15014020: Elide hole checks on KeyedLoads of holey double arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with ToT Created 7 years, 7 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/code-stubs-hydrogen.cc ('k') | src/heap.cc » ('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 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)); \
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698