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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 observers_begin_perform_splice) \ | 178 observers_begin_perform_splice) \ |
179 V(OBSERVERS_END_SPLICE_INDEX, JSFunction, \ | 179 V(OBSERVERS_END_SPLICE_INDEX, JSFunction, \ |
180 observers_end_perform_splice) \ | 180 observers_end_perform_splice) \ |
181 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \ | 181 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \ |
182 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ | 182 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ |
183 V(STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, Map, \ | 183 V(STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, Map, \ |
184 strict_mode_generator_function_map) \ | 184 strict_mode_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(GENERATOR_RESULT_MAP_INDEX, Map, generator_result_map) \ | 187 V(GENERATOR_RESULT_MAP_INDEX, Map, generator_result_map) \ |
188 V(RANDOM_STATE_INDEX, Smi, random_state) | 188 V(RANDOM_SEED_INDEX, ByteArray, random_seed) |
189 | 189 |
190 // JSFunctions are pairs (context, function code), sometimes also called | 190 // JSFunctions are pairs (context, function code), sometimes also called |
191 // closures. A Context object is used to represent function contexts and | 191 // closures. A Context object is used to represent function contexts and |
192 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). | 192 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). |
193 // | 193 // |
194 // At runtime, the contexts build a stack in parallel to the execution | 194 // At runtime, the contexts build a stack in parallel to the execution |
195 // stack, with the top-most context being the current context. All contexts | 195 // stack, with the top-most context being the current context. All contexts |
196 // have the following slots: | 196 // have the following slots: |
197 // | 197 // |
198 // [ closure ] This is the current function. It is the same for all | 198 // [ closure ] This is the current function. It is the same for all |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 PROXY_ENUMERATE_INDEX, | 325 PROXY_ENUMERATE_INDEX, |
326 OBSERVERS_NOTIFY_CHANGE_INDEX, | 326 OBSERVERS_NOTIFY_CHANGE_INDEX, |
327 OBSERVERS_ENQUEUE_SPLICE_INDEX, | 327 OBSERVERS_ENQUEUE_SPLICE_INDEX, |
328 OBSERVERS_BEGIN_SPLICE_INDEX, | 328 OBSERVERS_BEGIN_SPLICE_INDEX, |
329 OBSERVERS_END_SPLICE_INDEX, | 329 OBSERVERS_END_SPLICE_INDEX, |
330 OBSERVERS_DELIVER_CHANGES_INDEX, | 330 OBSERVERS_DELIVER_CHANGES_INDEX, |
331 GENERATOR_FUNCTION_MAP_INDEX, | 331 GENERATOR_FUNCTION_MAP_INDEX, |
332 STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, | 332 STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, |
333 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, | 333 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, |
334 GENERATOR_RESULT_MAP_INDEX, | 334 GENERATOR_RESULT_MAP_INDEX, |
335 RANDOM_STATE_INDEX, | 335 RANDOM_SEED_INDEX, |
336 | 336 |
337 // Properties from here are treated as weak references by the full GC. | 337 // Properties from here are treated as weak references by the full GC. |
338 // Scavenge treats them as strong references. | 338 // Scavenge treats them as strong references. |
339 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 339 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
340 OPTIMIZED_CODE_LIST, // Weak. | 340 OPTIMIZED_CODE_LIST, // Weak. |
341 DEOPTIMIZED_CODE_LIST, // Weak. | 341 DEOPTIMIZED_CODE_LIST, // Weak. |
342 MAP_CACHE_INDEX, // Weak. | 342 MAP_CACHE_INDEX, // Weak. |
343 NEXT_CONTEXT_LINK, // Weak. | 343 NEXT_CONTEXT_LINK, // Weak. |
344 | 344 |
345 // Total number of slots. | 345 // Total number of slots. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 521 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
522 #endif | 522 #endif |
523 | 523 |
524 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); | 524 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); |
525 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 525 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
526 }; | 526 }; |
527 | 527 |
528 } } // namespace v8::internal | 528 } } // namespace v8::internal |
529 | 529 |
530 #endif // V8_CONTEXTS_H_ | 530 #endif // V8_CONTEXTS_H_ |
OLD | NEW |