OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ | 132 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ |
133 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ | 133 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ |
134 V(MAP_CACHE_INDEX, Object, map_cache) \ | 134 V(MAP_CACHE_INDEX, Object, map_cache) \ |
135 V(CONTEXT_DATA_INDEX, Object, data) \ | 135 V(CONTEXT_DATA_INDEX, Object, data) \ |
136 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ | 136 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ |
137 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ | 137 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ |
138 to_complete_property_descriptor) \ | 138 to_complete_property_descriptor) \ |
139 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ | 139 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ |
140 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ | 140 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ |
141 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \ | 141 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \ |
| 142 V(PROXY_ENUMERATE, JSFunction, proxy_enumerate) \ |
142 V(RANDOM_SEED_INDEX, ByteArray, random_seed) | 143 V(RANDOM_SEED_INDEX, ByteArray, random_seed) |
143 | 144 |
144 // JSFunctions are pairs (context, function code), sometimes also called | 145 // JSFunctions are pairs (context, function code), sometimes also called |
145 // closures. A Context object is used to represent function contexts and | 146 // closures. A Context object is used to represent function contexts and |
146 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). | 147 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). |
147 // | 148 // |
148 // At runtime, the contexts build a stack in parallel to the execution | 149 // At runtime, the contexts build a stack in parallel to the execution |
149 // stack, with the top-most context being the current context. All contexts | 150 // stack, with the top-most context being the current context. All contexts |
150 // have the following slots: | 151 // have the following slots: |
151 // | 152 // |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 SCRIPT_FUNCTION_INDEX, | 254 SCRIPT_FUNCTION_INDEX, |
254 OPAQUE_REFERENCE_FUNCTION_INDEX, | 255 OPAQUE_REFERENCE_FUNCTION_INDEX, |
255 CONTEXT_EXTENSION_FUNCTION_INDEX, | 256 CONTEXT_EXTENSION_FUNCTION_INDEX, |
256 OUT_OF_MEMORY_INDEX, | 257 OUT_OF_MEMORY_INDEX, |
257 CONTEXT_DATA_INDEX, | 258 CONTEXT_DATA_INDEX, |
258 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, | 259 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, |
259 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, | 260 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, |
260 DERIVED_HAS_TRAP_INDEX, | 261 DERIVED_HAS_TRAP_INDEX, |
261 DERIVED_GET_TRAP_INDEX, | 262 DERIVED_GET_TRAP_INDEX, |
262 DERIVED_SET_TRAP_INDEX, | 263 DERIVED_SET_TRAP_INDEX, |
| 264 PROXY_ENUMERATE, |
263 RANDOM_SEED_INDEX, | 265 RANDOM_SEED_INDEX, |
264 | 266 |
265 // Properties from here are treated as weak references by the full GC. | 267 // Properties from here are treated as weak references by the full GC. |
266 // Scavenge treats them as strong references. | 268 // Scavenge treats them as strong references. |
267 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 269 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
268 MAP_CACHE_INDEX, // Weak. | 270 MAP_CACHE_INDEX, // Weak. |
269 NEXT_CONTEXT_LINK, // Weak. | 271 NEXT_CONTEXT_LINK, // Weak. |
270 | 272 |
271 // Total number of slots. | 273 // Total number of slots. |
272 GLOBAL_CONTEXT_SLOTS, | 274 GLOBAL_CONTEXT_SLOTS, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 #ifdef DEBUG | 415 #ifdef DEBUG |
414 // Bootstrapping-aware type checks. | 416 // Bootstrapping-aware type checks. |
415 static bool IsBootstrappingOrContext(Object* object); | 417 static bool IsBootstrappingOrContext(Object* object); |
416 static bool IsBootstrappingOrGlobalObject(Object* object); | 418 static bool IsBootstrappingOrGlobalObject(Object* object); |
417 #endif | 419 #endif |
418 }; | 420 }; |
419 | 421 |
420 } } // namespace v8::internal | 422 } } // namespace v8::internal |
421 | 423 |
422 #endif // V8_CONTEXTS_H_ | 424 #endif // V8_CONTEXTS_H_ |
OLD | NEW |