| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ | 158 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ |
| 159 error_message_for_code_gen_from_strings) \ | 159 error_message_for_code_gen_from_strings) \ |
| 160 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ | 160 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ |
| 161 to_complete_property_descriptor) \ | 161 to_complete_property_descriptor) \ |
| 162 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ | 162 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ |
| 163 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ | 163 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ |
| 164 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \ | 164 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \ |
| 165 V(PROXY_ENUMERATE_INDEX, JSFunction, proxy_enumerate) \ | 165 V(PROXY_ENUMERATE_INDEX, JSFunction, proxy_enumerate) \ |
| 166 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \ | 166 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \ |
| 167 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \ | 167 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \ |
| 168 V(GENERATOR_FUNCTION_MAP_INDEX, Map, generator_function_map) \ |
| 169 V(STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, Map, \ |
| 170 strict_mode_generator_function_map) \ |
| 171 V(GENERATOR_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \ |
| 172 generator_iterator_prototype_map) \ |
| 168 V(RANDOM_SEED_INDEX, ByteArray, random_seed) | 173 V(RANDOM_SEED_INDEX, ByteArray, random_seed) |
| 169 | 174 |
| 170 // JSFunctions are pairs (context, function code), sometimes also called | 175 // JSFunctions are pairs (context, function code), sometimes also called |
| 171 // closures. A Context object is used to represent function contexts and | 176 // closures. A Context object is used to represent function contexts and |
| 172 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). | 177 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). |
| 173 // | 178 // |
| 174 // At runtime, the contexts build a stack in parallel to the execution | 179 // At runtime, the contexts build a stack in parallel to the execution |
| 175 // stack, with the top-most context being the current context. All contexts | 180 // stack, with the top-most context being the current context. All contexts |
| 176 // have the following slots: | 181 // have the following slots: |
| 177 // | 182 // |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 EMBEDDER_DATA_INDEX, | 293 EMBEDDER_DATA_INDEX, |
| 289 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, | 294 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, |
| 290 ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, | 295 ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, |
| 291 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, | 296 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, |
| 292 DERIVED_HAS_TRAP_INDEX, | 297 DERIVED_HAS_TRAP_INDEX, |
| 293 DERIVED_GET_TRAP_INDEX, | 298 DERIVED_GET_TRAP_INDEX, |
| 294 DERIVED_SET_TRAP_INDEX, | 299 DERIVED_SET_TRAP_INDEX, |
| 295 PROXY_ENUMERATE_INDEX, | 300 PROXY_ENUMERATE_INDEX, |
| 296 OBSERVERS_NOTIFY_CHANGE_INDEX, | 301 OBSERVERS_NOTIFY_CHANGE_INDEX, |
| 297 OBSERVERS_DELIVER_CHANGES_INDEX, | 302 OBSERVERS_DELIVER_CHANGES_INDEX, |
| 303 GENERATOR_FUNCTION_MAP_INDEX, |
| 304 STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX, |
| 305 GENERATOR_ITERATOR_PROTOTYPE_MAP_INDEX, |
| 298 RANDOM_SEED_INDEX, | 306 RANDOM_SEED_INDEX, |
| 299 | 307 |
| 300 // Properties from here are treated as weak references by the full GC. | 308 // Properties from here are treated as weak references by the full GC. |
| 301 // Scavenge treats them as strong references. | 309 // Scavenge treats them as strong references. |
| 302 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 310 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
| 303 MAP_CACHE_INDEX, // Weak. | 311 MAP_CACHE_INDEX, // Weak. |
| 304 NEXT_CONTEXT_LINK, // Weak. | 312 NEXT_CONTEXT_LINK, // Weak. |
| 305 | 313 |
| 306 // Total number of slots. | 314 // Total number of slots. |
| 307 NATIVE_CONTEXT_SLOTS, | 315 NATIVE_CONTEXT_SLOTS, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 static bool IsBootstrappingOrGlobalObject(Object* object); | 468 static bool IsBootstrappingOrGlobalObject(Object* object); |
| 461 #endif | 469 #endif |
| 462 | 470 |
| 463 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); | 471 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); |
| 464 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 472 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 465 }; | 473 }; |
| 466 | 474 |
| 467 } } // namespace v8::internal | 475 } } // namespace v8::internal |
| 468 | 476 |
| 469 #endif // V8_CONTEXTS_H_ | 477 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |