Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Side by Side Diff: src/contexts.h

Issue 7828080: Fix and test use of property descriptor objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_PROPERTY_DESCRIPTOR_INDEX, JSFunction, to_property_descriptor) \
114 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \
115 to_complete_property_descriptor) \
113 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ 116 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \
114 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ 117 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \
115 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) 118 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap)
116 119
117 // JSFunctions are pairs (context, function code), sometimes also called 120 // JSFunctions are pairs (context, function code), sometimes also called
118 // closures. A Context object is used to represent function contexts and 121 // closures. A Context object is used to represent function contexts and
119 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 122 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
120 // 123 //
121 // At runtime, the contexts build a stack in parallel to the execution 124 // 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 125 // stack, with the top-most context being the current context. All contexts
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 NORMALIZED_MAP_CACHE_INDEX, 224 NORMALIZED_MAP_CACHE_INDEX,
222 RUNTIME_CONTEXT_INDEX, 225 RUNTIME_CONTEXT_INDEX,
223 CALL_AS_FUNCTION_DELEGATE_INDEX, 226 CALL_AS_FUNCTION_DELEGATE_INDEX,
224 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 227 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
225 SCRIPT_FUNCTION_INDEX, 228 SCRIPT_FUNCTION_INDEX,
226 OPAQUE_REFERENCE_FUNCTION_INDEX, 229 OPAQUE_REFERENCE_FUNCTION_INDEX,
227 CONTEXT_EXTENSION_FUNCTION_INDEX, 230 CONTEXT_EXTENSION_FUNCTION_INDEX,
228 OUT_OF_MEMORY_INDEX, 231 OUT_OF_MEMORY_INDEX,
229 CONTEXT_DATA_INDEX, 232 CONTEXT_DATA_INDEX,
230 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, 233 ALLOW_CODE_GEN_FROM_STRINGS_INDEX,
234 TO_PROPERTY_DESCRIPTOR_INDEX,
235 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX,
231 DERIVED_HAS_TRAP_INDEX, 236 DERIVED_HAS_TRAP_INDEX,
232 DERIVED_GET_TRAP_INDEX, 237 DERIVED_GET_TRAP_INDEX,
233 DERIVED_SET_TRAP_INDEX, 238 DERIVED_SET_TRAP_INDEX,
234 239
235 // Properties from here are treated as weak references by the full GC. 240 // Properties from here are treated as weak references by the full GC.
236 // Scavenge treats them as strong references. 241 // Scavenge treats them as strong references.
237 OPTIMIZED_FUNCTIONS_LIST, // Weak. 242 OPTIMIZED_FUNCTIONS_LIST, // Weak.
238 MAP_CACHE_INDEX, // Weak. 243 MAP_CACHE_INDEX, // Weak.
239 NEXT_CONTEXT_LINK, // Weak. 244 NEXT_CONTEXT_LINK, // Weak.
240 245
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 #ifdef DEBUG 392 #ifdef DEBUG
388 // Bootstrapping-aware type checks. 393 // Bootstrapping-aware type checks.
389 static bool IsBootstrappingOrContext(Object* object); 394 static bool IsBootstrappingOrContext(Object* object);
390 static bool IsBootstrappingOrGlobalObject(Object* object); 395 static bool IsBootstrappingOrGlobalObject(Object* object);
391 #endif 396 #endif
392 }; 397 };
393 398
394 } } // namespace v8::internal 399 } } // namespace v8::internal
395 400
396 #endif // V8_CONTEXTS_H_ 401 #endif // V8_CONTEXTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698