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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ | 103 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ |
104 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ | 104 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ |
105 call_as_constructor_delegate) \ | 105 call_as_constructor_delegate) \ |
106 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ | 106 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ |
107 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ | 107 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ |
108 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ | 108 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ |
109 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ | 109 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ |
110 V(MAP_CACHE_INDEX, Object, map_cache) \ | 110 V(MAP_CACHE_INDEX, Object, map_cache) \ |
111 V(CONTEXT_DATA_INDEX, Object, data) \ | 111 V(CONTEXT_DATA_INDEX, Object, data) \ |
112 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ | 112 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ |
| 113 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ |
| 114 to_complete_property_descriptor) \ |
113 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ | 115 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ |
114 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ | 116 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ |
115 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) | 117 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) |
116 | 118 |
117 // JSFunctions are pairs (context, function code), sometimes also called | 119 // JSFunctions are pairs (context, function code), sometimes also called |
118 // closures. A Context object is used to represent function contexts and | 120 // closures. A Context object is used to represent function contexts and |
119 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). | 121 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). |
120 // | 122 // |
121 // At runtime, the contexts build a stack in parallel to the execution | 123 // At runtime, the contexts build a stack in parallel to the execution |
122 // stack, with the top-most context being the current context. All contexts | 124 // stack, with the top-most context being the current context. All contexts |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 NORMALIZED_MAP_CACHE_INDEX, | 223 NORMALIZED_MAP_CACHE_INDEX, |
222 RUNTIME_CONTEXT_INDEX, | 224 RUNTIME_CONTEXT_INDEX, |
223 CALL_AS_FUNCTION_DELEGATE_INDEX, | 225 CALL_AS_FUNCTION_DELEGATE_INDEX, |
224 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, | 226 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, |
225 SCRIPT_FUNCTION_INDEX, | 227 SCRIPT_FUNCTION_INDEX, |
226 OPAQUE_REFERENCE_FUNCTION_INDEX, | 228 OPAQUE_REFERENCE_FUNCTION_INDEX, |
227 CONTEXT_EXTENSION_FUNCTION_INDEX, | 229 CONTEXT_EXTENSION_FUNCTION_INDEX, |
228 OUT_OF_MEMORY_INDEX, | 230 OUT_OF_MEMORY_INDEX, |
229 CONTEXT_DATA_INDEX, | 231 CONTEXT_DATA_INDEX, |
230 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, | 232 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, |
| 233 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, |
231 DERIVED_HAS_TRAP_INDEX, | 234 DERIVED_HAS_TRAP_INDEX, |
232 DERIVED_GET_TRAP_INDEX, | 235 DERIVED_GET_TRAP_INDEX, |
233 DERIVED_SET_TRAP_INDEX, | 236 DERIVED_SET_TRAP_INDEX, |
234 | 237 |
235 // Properties from here are treated as weak references by the full GC. | 238 // Properties from here are treated as weak references by the full GC. |
236 // Scavenge treats them as strong references. | 239 // Scavenge treats them as strong references. |
237 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 240 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
238 MAP_CACHE_INDEX, // Weak. | 241 MAP_CACHE_INDEX, // Weak. |
239 NEXT_CONTEXT_LINK, // Weak. | 242 NEXT_CONTEXT_LINK, // Weak. |
240 | 243 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 #ifdef DEBUG | 390 #ifdef DEBUG |
388 // Bootstrapping-aware type checks. | 391 // Bootstrapping-aware type checks. |
389 static bool IsBootstrappingOrContext(Object* object); | 392 static bool IsBootstrappingOrContext(Object* object); |
390 static bool IsBootstrappingOrGlobalObject(Object* object); | 393 static bool IsBootstrappingOrGlobalObject(Object* object); |
391 #endif | 394 #endif |
392 }; | 395 }; |
393 | 396 |
394 } } // namespace v8::internal | 397 } } // namespace v8::internal |
395 | 398 |
396 #endif // V8_CONTEXTS_H_ | 399 #endif // V8_CONTEXTS_H_ |
OLD | NEW |