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

Side by Side 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: Implement missing platforms and add tests 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 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
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ 106 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \
107 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \ 107 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
108 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ 108 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \
109 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ 109 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
110 V(JS_ARRAY_MAPS_INDEX, Object, js_array_maps) \ 110 V(JS_ARRAY_MAPS_INDEX, Object, js_array_maps) \
111 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \ 111 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \
112 V(JSON_OBJECT_INDEX, JSObject, json_object) \ 112 V(JSON_OBJECT_INDEX, JSObject, json_object) \
113 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ 113 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
114 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 114 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
115 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \
115 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \ 116 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \
116 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ 117 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \
117 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \ 118 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \
118 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \ 119 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \
119 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \ 120 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \
120 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \ 121 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \
121 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \ 122 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \
122 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \ 123 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \
123 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ 124 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \
124 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \ 125 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ALIASED_ARGUMENTS_BOILERPLATE_INDEX, 257 ALIASED_ARGUMENTS_BOILERPLATE_INDEX,
257 STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX, 258 STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX,
258 REGEXP_RESULT_MAP_INDEX, 259 REGEXP_RESULT_MAP_INDEX,
259 FUNCTION_MAP_INDEX, 260 FUNCTION_MAP_INDEX,
260 STRICT_MODE_FUNCTION_MAP_INDEX, 261 STRICT_MODE_FUNCTION_MAP_INDEX,
261 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 262 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
262 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 263 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
263 FUNCTION_INSTANCE_MAP_INDEX, 264 FUNCTION_INSTANCE_MAP_INDEX,
264 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, 265 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX,
265 INITIAL_OBJECT_PROTOTYPE_INDEX, 266 INITIAL_OBJECT_PROTOTYPE_INDEX,
267 INITIAL_ARRAY_PROTOTYPE_INDEX,
266 BOOLEAN_FUNCTION_INDEX, 268 BOOLEAN_FUNCTION_INDEX,
267 NUMBER_FUNCTION_INDEX, 269 NUMBER_FUNCTION_INDEX,
268 STRING_FUNCTION_INDEX, 270 STRING_FUNCTION_INDEX,
269 STRING_FUNCTION_PROTOTYPE_MAP_INDEX, 271 STRING_FUNCTION_PROTOTYPE_MAP_INDEX,
270 SYMBOL_FUNCTION_INDEX, 272 SYMBOL_FUNCTION_INDEX,
271 OBJECT_FUNCTION_INDEX, 273 OBJECT_FUNCTION_INDEX,
272 INTERNAL_ARRAY_FUNCTION_INDEX, 274 INTERNAL_ARRAY_FUNCTION_INDEX,
273 ARRAY_FUNCTION_INDEX, 275 ARRAY_FUNCTION_INDEX,
274 JS_ARRAY_MAPS_INDEX, 276 JS_ARRAY_MAPS_INDEX,
275 DATE_FUNCTION_INDEX, 277 DATE_FUNCTION_INDEX,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 Object* OptimizedFunctionsListHead(); 429 Object* OptimizedFunctionsListHead();
428 void ClearOptimizedFunctions(); 430 void ClearOptimizedFunctions();
429 431
430 Handle<Object> ErrorMessageForCodeGenerationFromStrings(); 432 Handle<Object> ErrorMessageForCodeGenerationFromStrings();
431 433
432 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ 434 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \
433 void set_##name(type* value) { \ 435 void set_##name(type* value) { \
434 ASSERT(IsNativeContext()); \ 436 ASSERT(IsNativeContext()); \
435 set(index, value); \ 437 set(index, value); \
436 } \ 438 } \
439 bool is_##name(type* value) { \
440 ASSERT(IsNativeContext()); \
441 return type::cast(get(index)) == value; \
442 } \
437 type* name() { \ 443 type* name() { \
438 ASSERT(IsNativeContext()); \ 444 ASSERT(IsNativeContext()); \
439 return type::cast(get(index)); \ 445 return type::cast(get(index)); \
440 } 446 }
441 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) 447 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
442 #undef NATIVE_CONTEXT_FIELD_ACCESSORS 448 #undef NATIVE_CONTEXT_FIELD_ACCESSORS
443 449
444 // Lookup the slot called name, starting with the current context. 450 // Lookup the slot called name, starting with the current context.
445 // There are three possibilities: 451 // There are three possibilities:
446 // 452 //
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 static bool IsBootstrappingOrGlobalObject(Object* object); 506 static bool IsBootstrappingOrGlobalObject(Object* object);
501 #endif 507 #endif
502 508
503 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 509 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
504 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 510 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
505 }; 511 };
506 512
507 } } // namespace v8::internal 513 } } // namespace v8::internal
508 514
509 #endif // V8_CONTEXTS_H_ 515 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/heap.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698