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

Side by Side Diff: src/contexts.h

Issue 327173002: Optimize various forms of slice.call(arguments, ...) (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « src/bootstrapper.cc ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap.h" 8 #include "src/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, \ 179 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, \
180 native_object_get_notifier) \ 180 native_object_get_notifier) \
181 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ 181 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \
182 native_object_notifier_perform_change) \ 182 native_object_notifier_perform_change) \
183 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ 183 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \
184 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ 184 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \
185 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \ 185 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \
186 generator_object_prototype_map) \ 186 generator_object_prototype_map) \
187 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ 187 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \
188 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ 188 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \
189 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) 189 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \
190 V(BUILTIN_JS_FUNCTIONS_INDEX, FixedArray, builtin_js_functions)
190 191
191 // JSFunctions are pairs (context, function code), sometimes also called 192 // JSFunctions are pairs (context, function code), sometimes also called
192 // closures. A Context object is used to represent function contexts and 193 // closures. A Context object is used to represent function contexts and
193 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 194 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
194 // 195 //
195 // At runtime, the contexts build a stack in parallel to the execution 196 // At runtime, the contexts build a stack in parallel to the execution
196 // stack, with the top-most context being the current context. All contexts 197 // stack, with the top-most context being the current context. All contexts
197 // have the following slots: 198 // have the following slots:
198 // 199 //
199 // [ closure ] This is the current function. It is the same for all 200 // [ closure ] This is the current function. It is the same for all
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 OBSERVERS_END_SPLICE_INDEX, 352 OBSERVERS_END_SPLICE_INDEX,
352 NATIVE_OBJECT_OBSERVE_INDEX, 353 NATIVE_OBJECT_OBSERVE_INDEX,
353 NATIVE_OBJECT_GET_NOTIFIER_INDEX, 354 NATIVE_OBJECT_GET_NOTIFIER_INDEX,
354 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, 355 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE,
355 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, 356 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX,
356 STRICT_GENERATOR_FUNCTION_MAP_INDEX, 357 STRICT_GENERATOR_FUNCTION_MAP_INDEX,
357 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, 358 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX,
358 ITERATOR_RESULT_MAP_INDEX, 359 ITERATOR_RESULT_MAP_INDEX,
359 MAP_ITERATOR_MAP_INDEX, 360 MAP_ITERATOR_MAP_INDEX,
360 SET_ITERATOR_MAP_INDEX, 361 SET_ITERATOR_MAP_INDEX,
362 BUILTIN_JS_FUNCTIONS_INDEX,
361 363
362 // Properties from here are treated as weak references by the full GC. 364 // Properties from here are treated as weak references by the full GC.
363 // Scavenge treats them as strong references. 365 // Scavenge treats them as strong references.
364 OPTIMIZED_FUNCTIONS_LIST, // Weak. 366 OPTIMIZED_FUNCTIONS_LIST, // Weak.
365 OPTIMIZED_CODE_LIST, // Weak. 367 OPTIMIZED_CODE_LIST, // Weak.
366 DEOPTIMIZED_CODE_LIST, // Weak. 368 DEOPTIMIZED_CODE_LIST, // Weak.
367 MAP_CACHE_INDEX, // Weak. 369 MAP_CACHE_INDEX, // Weak.
368 NEXT_CONTEXT_LINK, // Weak. 370 NEXT_CONTEXT_LINK, // Weak.
369 371
370 // Total number of slots. 372 // Total number of slots.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 547 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
546 #endif 548 #endif
547 549
548 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 550 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
549 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 551 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
550 }; 552 };
551 553
552 } } // namespace v8::internal 554 } } // namespace v8::internal
553 555
554 #endif // V8_CONTEXTS_H_ 556 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698