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