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

Side by Side Diff: src/contexts.h

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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/compiler.cc ('k') | src/conversions.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \ 87 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \
88 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \ 88 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \
89 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \ 89 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \
90 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \ 90 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \
91 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \ 91 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \
92 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \ 92 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
93 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 93 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
94 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 94 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
95 call_as_constructor_delegate) \ 95 call_as_constructor_delegate) \
96 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ 96 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
97 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
97 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 98 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
98 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ 99 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
99 V(MAP_CACHE_INDEX, Object, map_cache) \ 100 V(MAP_CACHE_INDEX, Object, map_cache) \
100 V(CONTEXT_DATA_INDEX, Object, data) 101 V(CONTEXT_DATA_INDEX, Object, data)
101 102
102 // JSFunctions are pairs (context, function code), sometimes also called 103 // JSFunctions are pairs (context, function code), sometimes also called
103 // closures. A Context object is used to represent function contexts and 104 // closures. A Context object is used to represent function contexts and
104 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 105 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
105 // 106 //
106 // At runtime, the contexts build a stack in parallel to the execution 107 // At runtime, the contexts build a stack in parallel to the execution
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 SPECIAL_FUNCTION_TABLE_INDEX, 208 SPECIAL_FUNCTION_TABLE_INDEX,
208 MESSAGE_LISTENERS_INDEX, 209 MESSAGE_LISTENERS_INDEX,
209 MAKE_MESSAGE_FUN_INDEX, 210 MAKE_MESSAGE_FUN_INDEX,
210 GET_STACK_TRACE_LINE_INDEX, 211 GET_STACK_TRACE_LINE_INDEX,
211 CONFIGURE_GLOBAL_INDEX, 212 CONFIGURE_GLOBAL_INDEX,
212 FUNCTION_CACHE_INDEX, 213 FUNCTION_CACHE_INDEX,
213 RUNTIME_CONTEXT_INDEX, 214 RUNTIME_CONTEXT_INDEX,
214 CALL_AS_FUNCTION_DELEGATE_INDEX, 215 CALL_AS_FUNCTION_DELEGATE_INDEX,
215 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 216 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
216 SCRIPT_FUNCTION_INDEX, 217 SCRIPT_FUNCTION_INDEX,
218 OPAQUE_REFERENCE_FUNCTION_INDEX,
217 CONTEXT_EXTENSION_FUNCTION_INDEX, 219 CONTEXT_EXTENSION_FUNCTION_INDEX,
218 OUT_OF_MEMORY_INDEX, 220 OUT_OF_MEMORY_INDEX,
219 MAP_CACHE_INDEX, 221 MAP_CACHE_INDEX,
220 CONTEXT_DATA_INDEX, 222 CONTEXT_DATA_INDEX,
221 GLOBAL_CONTEXT_SLOTS 223 GLOBAL_CONTEXT_SLOTS
222 }; 224 };
223 225
224 // Direct slot access. 226 // Direct slot access.
225 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } 227 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); }
226 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } 228 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 #ifdef DEBUG 335 #ifdef DEBUG
334 // Bootstrapping-aware type checks. 336 // Bootstrapping-aware type checks.
335 static bool IsBootstrappingOrContext(Object* object); 337 static bool IsBootstrappingOrContext(Object* object);
336 static bool IsBootstrappingOrGlobalObject(Object* object); 338 static bool IsBootstrappingOrGlobalObject(Object* object);
337 #endif 339 #endif
338 }; 340 };
339 341
340 } } // namespace v8::internal 342 } } // namespace v8::internal
341 343
342 #endif // V8_CONTEXTS_H_ 344 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698