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

Side by Side Diff: src/contexts.h

Issue 9073007: Store transitioned JSArray maps in global context (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/builtins.cc ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #define GLOBAL_CONTEXT_FIELDS(V) \ 99 #define GLOBAL_CONTEXT_FIELDS(V) \
100 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ 100 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \
101 V(SECURITY_TOKEN_INDEX, Object, security_token) \ 101 V(SECURITY_TOKEN_INDEX, Object, security_token) \
102 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ 102 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
103 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \ 103 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \
104 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ 104 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \
105 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ 105 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \
106 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \ 106 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
107 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ 107 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \
108 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ 108 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
109 V(SMI_JS_ARRAY_MAP_INDEX, Object, smi_js_array_map) \
110 V(DOUBLE_JS_ARRAY_MAP_INDEX, Object, double_js_array_map) \
111 V(OBJECT_JS_ARRAY_MAP_INDEX, Object, object_js_array_map) \
109 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \ 112 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \
110 V(JSON_OBJECT_INDEX, JSObject, json_object) \ 113 V(JSON_OBJECT_INDEX, JSObject, json_object) \
111 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ 114 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
112 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 115 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
113 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \ 116 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \
114 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ 117 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \
115 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \ 118 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \
116 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \ 119 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \
117 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \ 120 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \
118 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \ 121 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \
119 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \ 122 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \
120 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \ 123 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \
121 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ 124 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \
122 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \ 125 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \
123 V(CONFIGURE_INSTANCE_FUN_INDEX, JSFunction, configure_instance_fun) \ 126 V(CONFIGURE_INSTANCE_FUN_INDEX, JSFunction, configure_instance_fun) \
124 V(FUNCTION_MAP_INDEX, Map, function_map) \ 127 V(FUNCTION_MAP_INDEX, Map, function_map) \
125 V(STRICT_MODE_FUNCTION_MAP_INDEX, Map, strict_mode_function_map) \ 128 V(STRICT_MODE_FUNCTION_MAP_INDEX, Map, strict_mode_function_map) \
126 V(FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, function_without_prototype_map) \ 129 V(FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, function_without_prototype_map) \
127 V(STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \ 130 V(STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, Map, \
128 strict_mode_function_without_prototype_map) \ 131 strict_mode_function_without_prototype_map) \
129 V(FUNCTION_INSTANCE_MAP_INDEX, Map, function_instance_map) \ 132 V(FUNCTION_INSTANCE_MAP_INDEX, Map, function_instance_map) \
130 V(STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, Map, \ 133 V(STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, Map, \
131 strict_mode_function_instance_map) \ 134 strict_mode_function_instance_map) \
132 V(JS_ARRAY_MAP_INDEX, Map, js_array_map)\
133 V(REGEXP_RESULT_MAP_INDEX, Map, regexp_result_map)\ 135 V(REGEXP_RESULT_MAP_INDEX, Map, regexp_result_map)\
134 V(ARGUMENTS_BOILERPLATE_INDEX, JSObject, arguments_boilerplate) \ 136 V(ARGUMENTS_BOILERPLATE_INDEX, JSObject, arguments_boilerplate) \
135 V(ALIASED_ARGUMENTS_BOILERPLATE_INDEX, JSObject, \ 137 V(ALIASED_ARGUMENTS_BOILERPLATE_INDEX, JSObject, \
136 aliased_arguments_boilerplate) \ 138 aliased_arguments_boilerplate) \
137 V(STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX, JSObject, \ 139 V(STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX, JSObject, \
138 strict_mode_arguments_boilerplate) \ 140 strict_mode_arguments_boilerplate) \
139 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \ 141 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \
140 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \ 142 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \
141 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \ 143 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \
142 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \ 144 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 226
225 // This slot holds the thrown value in catch contexts. 227 // This slot holds the thrown value in catch contexts.
226 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS, 228 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS,
227 229
228 // These slots are only in global contexts. 230 // These slots are only in global contexts.
229 GLOBAL_PROXY_INDEX = MIN_CONTEXT_SLOTS, 231 GLOBAL_PROXY_INDEX = MIN_CONTEXT_SLOTS,
230 SECURITY_TOKEN_INDEX, 232 SECURITY_TOKEN_INDEX,
231 ARGUMENTS_BOILERPLATE_INDEX, 233 ARGUMENTS_BOILERPLATE_INDEX,
232 ALIASED_ARGUMENTS_BOILERPLATE_INDEX, 234 ALIASED_ARGUMENTS_BOILERPLATE_INDEX,
233 STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX, 235 STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX,
234 JS_ARRAY_MAP_INDEX,
235 REGEXP_RESULT_MAP_INDEX, 236 REGEXP_RESULT_MAP_INDEX,
236 FUNCTION_MAP_INDEX, 237 FUNCTION_MAP_INDEX,
237 STRICT_MODE_FUNCTION_MAP_INDEX, 238 STRICT_MODE_FUNCTION_MAP_INDEX,
238 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 239 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
239 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 240 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
240 FUNCTION_INSTANCE_MAP_INDEX, 241 FUNCTION_INSTANCE_MAP_INDEX,
241 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, 242 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX,
242 INITIAL_OBJECT_PROTOTYPE_INDEX, 243 INITIAL_OBJECT_PROTOTYPE_INDEX,
243 BOOLEAN_FUNCTION_INDEX, 244 BOOLEAN_FUNCTION_INDEX,
244 NUMBER_FUNCTION_INDEX, 245 NUMBER_FUNCTION_INDEX,
245 STRING_FUNCTION_INDEX, 246 STRING_FUNCTION_INDEX,
246 STRING_FUNCTION_PROTOTYPE_MAP_INDEX, 247 STRING_FUNCTION_PROTOTYPE_MAP_INDEX,
247 OBJECT_FUNCTION_INDEX, 248 OBJECT_FUNCTION_INDEX,
248 INTERNAL_ARRAY_FUNCTION_INDEX, 249 INTERNAL_ARRAY_FUNCTION_INDEX,
249 ARRAY_FUNCTION_INDEX, 250 ARRAY_FUNCTION_INDEX,
251 SMI_JS_ARRAY_MAP_INDEX,
252 DOUBLE_JS_ARRAY_MAP_INDEX,
253 OBJECT_JS_ARRAY_MAP_INDEX,
250 DATE_FUNCTION_INDEX, 254 DATE_FUNCTION_INDEX,
251 JSON_OBJECT_INDEX, 255 JSON_OBJECT_INDEX,
252 REGEXP_FUNCTION_INDEX, 256 REGEXP_FUNCTION_INDEX,
253 CREATE_DATE_FUN_INDEX, 257 CREATE_DATE_FUN_INDEX,
254 TO_NUMBER_FUN_INDEX, 258 TO_NUMBER_FUN_INDEX,
255 TO_STRING_FUN_INDEX, 259 TO_STRING_FUN_INDEX,
256 TO_DETAIL_STRING_FUN_INDEX, 260 TO_DETAIL_STRING_FUN_INDEX,
257 TO_OBJECT_FUN_INDEX, 261 TO_OBJECT_FUN_INDEX,
258 TO_INTEGER_FUN_INDEX, 262 TO_INTEGER_FUN_INDEX,
259 TO_UINT32_FUN_INDEX, 263 TO_UINT32_FUN_INDEX,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 #ifdef DEBUG 427 #ifdef DEBUG
424 // Bootstrapping-aware type checks. 428 // Bootstrapping-aware type checks.
425 static bool IsBootstrappingOrContext(Object* object); 429 static bool IsBootstrappingOrContext(Object* object);
426 static bool IsBootstrappingOrGlobalObject(Object* object); 430 static bool IsBootstrappingOrGlobalObject(Object* object);
427 #endif 431 #endif
428 }; 432 };
429 433
430 } } // namespace v8::internal 434 } } // namespace v8::internal
431 435
432 #endif // V8_CONTEXTS_H_ 436 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698