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

Side by Side Diff: src/contexts.h

Issue 7390028: Implement `in' for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing Mads' comments. Created 9 years, 5 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(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \
113 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ 114 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \
114 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) 115 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap)
115 116
116 // JSFunctions are pairs (context, function code), sometimes also called 117 // JSFunctions are pairs (context, function code), sometimes also called
117 // closures. A Context object is used to represent function contexts and 118 // closures. A Context object is used to represent function contexts and
118 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 119 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
119 // 120 //
120 // At runtime, the contexts build a stack in parallel to the execution 121 // At runtime, the contexts build a stack in parallel to the execution
121 // stack, with the top-most context being the current context. All contexts 122 // stack, with the top-most context being the current context. All contexts
122 // have the following slots: 123 // have the following slots:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 NORMALIZED_MAP_CACHE_INDEX, 221 NORMALIZED_MAP_CACHE_INDEX,
221 RUNTIME_CONTEXT_INDEX, 222 RUNTIME_CONTEXT_INDEX,
222 CALL_AS_FUNCTION_DELEGATE_INDEX, 223 CALL_AS_FUNCTION_DELEGATE_INDEX,
223 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 224 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
224 SCRIPT_FUNCTION_INDEX, 225 SCRIPT_FUNCTION_INDEX,
225 OPAQUE_REFERENCE_FUNCTION_INDEX, 226 OPAQUE_REFERENCE_FUNCTION_INDEX,
226 CONTEXT_EXTENSION_FUNCTION_INDEX, 227 CONTEXT_EXTENSION_FUNCTION_INDEX,
227 OUT_OF_MEMORY_INDEX, 228 OUT_OF_MEMORY_INDEX,
228 CONTEXT_DATA_INDEX, 229 CONTEXT_DATA_INDEX,
229 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, 230 ALLOW_CODE_GEN_FROM_STRINGS_INDEX,
231 DERIVED_HAS_TRAP_INDEX,
230 DERIVED_GET_TRAP_INDEX, 232 DERIVED_GET_TRAP_INDEX,
231 DERIVED_SET_TRAP_INDEX, 233 DERIVED_SET_TRAP_INDEX,
232 234
233 // Properties from here are treated as weak references by the full GC. 235 // Properties from here are treated as weak references by the full GC.
234 // Scavenge treats them as strong references. 236 // Scavenge treats them as strong references.
235 OPTIMIZED_FUNCTIONS_LIST, // Weak. 237 OPTIMIZED_FUNCTIONS_LIST, // Weak.
236 MAP_CACHE_INDEX, // Weak. 238 MAP_CACHE_INDEX, // Weak.
237 NEXT_CONTEXT_LINK, // Weak. 239 NEXT_CONTEXT_LINK, // Weak.
238 240
239 // Total number of slots. 241 // Total number of slots.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 #ifdef DEBUG 387 #ifdef DEBUG
386 // Bootstrapping-aware type checks. 388 // Bootstrapping-aware type checks.
387 static bool IsBootstrappingOrContext(Object* object); 389 static bool IsBootstrappingOrContext(Object* object);
388 static bool IsBootstrappingOrGlobalObject(Object* object); 390 static bool IsBootstrappingOrGlobalObject(Object* object);
389 #endif 391 #endif
390 }; 392 };
391 393
392 } } // namespace v8::internal 394 } } // namespace v8::internal
393 395
394 #endif // V8_CONTEXTS_H_ 396 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698