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

Side by Side Diff: src/contexts.h

Issue 6992072: Implement set trap for proxies, and revamp class hierarchy in preparation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 9 years, 6 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
« no previous file with comments | « src/bootstrapper.cc ('k') | src/handles.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 101 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
102 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 102 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
103 call_as_constructor_delegate) \ 103 call_as_constructor_delegate) \
104 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ 104 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
105 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ 105 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
106 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 106 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
107 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ 107 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
108 V(MAP_CACHE_INDEX, Object, map_cache) \ 108 V(MAP_CACHE_INDEX, Object, map_cache) \
109 V(CONTEXT_DATA_INDEX, Object, data) \ 109 V(CONTEXT_DATA_INDEX, Object, data) \
110 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ 110 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \
111 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) 111 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \
112 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap)
112 113
113 // JSFunctions are pairs (context, function code), sometimes also called 114 // JSFunctions are pairs (context, function code), sometimes also called
114 // closures. A Context object is used to represent function contexts and 115 // closures. A Context object is used to represent function contexts and
115 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 116 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
116 // 117 //
117 // At runtime, the contexts build a stack in parallel to the execution 118 // At runtime, the contexts build a stack in parallel to the execution
118 // stack, with the top-most context being the current context. All contexts 119 // stack, with the top-most context being the current context. All contexts
119 // have the following slots: 120 // have the following slots:
120 // 121 //
121 // [ closure ] This is the current function. It is the same for all 122 // [ closure ] This is the current function. It is the same for all
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 CALL_AS_FUNCTION_DELEGATE_INDEX, 234 CALL_AS_FUNCTION_DELEGATE_INDEX,
234 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 235 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
235 SCRIPT_FUNCTION_INDEX, 236 SCRIPT_FUNCTION_INDEX,
236 OPAQUE_REFERENCE_FUNCTION_INDEX, 237 OPAQUE_REFERENCE_FUNCTION_INDEX,
237 CONTEXT_EXTENSION_FUNCTION_INDEX, 238 CONTEXT_EXTENSION_FUNCTION_INDEX,
238 OUT_OF_MEMORY_INDEX, 239 OUT_OF_MEMORY_INDEX,
239 MAP_CACHE_INDEX, 240 MAP_CACHE_INDEX,
240 CONTEXT_DATA_INDEX, 241 CONTEXT_DATA_INDEX,
241 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, 242 ALLOW_CODE_GEN_FROM_STRINGS_INDEX,
242 DERIVED_GET_TRAP_INDEX, 243 DERIVED_GET_TRAP_INDEX,
244 DERIVED_SET_TRAP_INDEX,
243 245
244 // Properties from here are treated as weak references by the full GC. 246 // Properties from here are treated as weak references by the full GC.
245 // Scavenge treats them as strong references. 247 // Scavenge treats them as strong references.
246 OPTIMIZED_FUNCTIONS_LIST, // Weak. 248 OPTIMIZED_FUNCTIONS_LIST, // Weak.
247 NEXT_CONTEXT_LINK, // Weak. 249 NEXT_CONTEXT_LINK, // Weak.
248 250
249 // Total number of slots. 251 // Total number of slots.
250 GLOBAL_CONTEXT_SLOTS, 252 GLOBAL_CONTEXT_SLOTS,
251 253
252 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST 254 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 #ifdef DEBUG 384 #ifdef DEBUG
383 // Bootstrapping-aware type checks. 385 // Bootstrapping-aware type checks.
384 static bool IsBootstrappingOrContext(Object* object); 386 static bool IsBootstrappingOrContext(Object* object);
385 static bool IsBootstrappingOrGlobalObject(Object* object); 387 static bool IsBootstrappingOrGlobalObject(Object* object);
386 #endif 388 #endif
387 }; 389 };
388 390
389 } } // namespace v8::internal 391 } } // namespace v8::internal
390 392
391 #endif // V8_CONTEXTS_H_ 393 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698