OLD | NEW |
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \ | 184 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \ |
185 V(OBSERVERS_ENQUEUE_SPLICE_INDEX, JSFunction, observers_enqueue_splice) \ | 185 V(OBSERVERS_ENQUEUE_SPLICE_INDEX, JSFunction, observers_enqueue_splice) \ |
186 V(OBSERVERS_BEGIN_SPLICE_INDEX, JSFunction, \ | 186 V(OBSERVERS_BEGIN_SPLICE_INDEX, JSFunction, \ |
187 observers_begin_perform_splice) \ | 187 observers_begin_perform_splice) \ |
188 V(OBSERVERS_END_SPLICE_INDEX, JSFunction, \ | 188 V(OBSERVERS_END_SPLICE_INDEX, JSFunction, \ |
189 observers_end_perform_splice) \ | 189 observers_end_perform_splice) \ |
190 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ | 190 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ |
191 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ | 191 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ |
192 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \ | 192 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \ |
193 generator_object_prototype_map) \ | 193 generator_object_prototype_map) \ |
194 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ | 194 V(GENERATOR_RESULT_MAP_INDEX, Map, generator_result_map) |
195 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ | |
196 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) | |
197 | 195 |
198 // JSFunctions are pairs (context, function code), sometimes also called | 196 // JSFunctions are pairs (context, function code), sometimes also called |
199 // closures. A Context object is used to represent function contexts and | 197 // closures. A Context object is used to represent function contexts and |
200 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). | 198 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). |
201 // | 199 // |
202 // At runtime, the contexts build a stack in parallel to the execution | 200 // At runtime, the contexts build a stack in parallel to the execution |
203 // stack, with the top-most context being the current context. All contexts | 201 // stack, with the top-most context being the current context. All contexts |
204 // have the following slots: | 202 // have the following slots: |
205 // | 203 // |
206 // [ closure ] This is the current function. It is the same for all | 204 // [ closure ] This is the current function. It is the same for all |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 DERIVED_GET_TRAP_INDEX, | 340 DERIVED_GET_TRAP_INDEX, |
343 DERIVED_SET_TRAP_INDEX, | 341 DERIVED_SET_TRAP_INDEX, |
344 PROXY_ENUMERATE_INDEX, | 342 PROXY_ENUMERATE_INDEX, |
345 OBSERVERS_NOTIFY_CHANGE_INDEX, | 343 OBSERVERS_NOTIFY_CHANGE_INDEX, |
346 OBSERVERS_ENQUEUE_SPLICE_INDEX, | 344 OBSERVERS_ENQUEUE_SPLICE_INDEX, |
347 OBSERVERS_BEGIN_SPLICE_INDEX, | 345 OBSERVERS_BEGIN_SPLICE_INDEX, |
348 OBSERVERS_END_SPLICE_INDEX, | 346 OBSERVERS_END_SPLICE_INDEX, |
349 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, | 347 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, |
350 STRICT_GENERATOR_FUNCTION_MAP_INDEX, | 348 STRICT_GENERATOR_FUNCTION_MAP_INDEX, |
351 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, | 349 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, |
352 ITERATOR_RESULT_MAP_INDEX, | 350 GENERATOR_RESULT_MAP_INDEX, |
353 MAP_ITERATOR_MAP_INDEX, | |
354 SET_ITERATOR_MAP_INDEX, | |
355 | 351 |
356 // Properties from here are treated as weak references by the full GC. | 352 // Properties from here are treated as weak references by the full GC. |
357 // Scavenge treats them as strong references. | 353 // Scavenge treats them as strong references. |
358 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 354 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
359 OPTIMIZED_CODE_LIST, // Weak. | 355 OPTIMIZED_CODE_LIST, // Weak. |
360 DEOPTIMIZED_CODE_LIST, // Weak. | 356 DEOPTIMIZED_CODE_LIST, // Weak. |
361 MAP_CACHE_INDEX, // Weak. | 357 MAP_CACHE_INDEX, // Weak. |
362 NEXT_CONTEXT_LINK, // Weak. | 358 NEXT_CONTEXT_LINK, // Weak. |
363 | 359 |
364 // Total number of slots. | 360 // Total number of slots. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 530 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
535 #endif | 531 #endif |
536 | 532 |
537 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); | 533 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); |
538 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 534 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
539 }; | 535 }; |
540 | 536 |
541 } } // namespace v8::internal | 537 } } // namespace v8::internal |
542 | 538 |
543 #endif // V8_CONTEXTS_H_ | 539 #endif // V8_CONTEXTS_H_ |
OLD | NEW |