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

Side by Side Diff: src/contexts.h

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (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.cc » ('j') | src/heap.cc » ('J')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Heap-allocated activation contexts. 44 // Heap-allocated activation contexts.
45 // 45 //
46 // Contexts are implemented as FixedArray objects; the Context 46 // Contexts are implemented as FixedArray objects; the Context
47 // class is a convenience interface casted on a FixedArray object. 47 // class is a convenience interface casted on a FixedArray object.
48 // 48 //
49 // Note: Context must have no virtual functions and Context objects 49 // Note: Context must have no virtual functions and Context objects
50 // must always be allocated via Heap::AllocateContext() or 50 // must always be allocated via Heap::AllocateContext() or
51 // Factory::NewContext. 51 // Factory::NewContext.
52 52
53 // Comment for special_function_table:
54 // Table for providing optimized/specialized functions.
55 // The array contains triplets [object, general_function, optimized_function].
56 // Primarily added to support built-in optimized variants of
57 // Array.prototype.{push,pop}.
58
59 #define GLOBAL_CONTEXT_FIELDS(V) \ 53 #define GLOBAL_CONTEXT_FIELDS(V) \
60 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ 54 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \
61 V(SECURITY_TOKEN_INDEX, Object, security_token) \ 55 V(SECURITY_TOKEN_INDEX, Object, security_token) \
62 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ 56 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
63 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \ 57 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \
64 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ 58 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \
65 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \ 59 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
66 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ 60 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
67 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \ 61 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \
68 V(JSON_OBJECT_INDEX, JSObject, json_object) \ 62 V(JSON_OBJECT_INDEX, JSObject, json_object) \
69 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ 63 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
70 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 64 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
71 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \ 65 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \
72 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ 66 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \
73 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \ 67 V(TO_STRING_FUN_INDEX, JSFunction, to_string_fun) \
74 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \ 68 V(TO_DETAIL_STRING_FUN_INDEX, JSFunction, to_detail_string_fun) \
75 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \ 69 V(TO_OBJECT_FUN_INDEX, JSFunction, to_object_fun) \
76 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \ 70 V(TO_INTEGER_FUN_INDEX, JSFunction, to_integer_fun) \
77 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \ 71 V(TO_UINT32_FUN_INDEX, JSFunction, to_uint32_fun) \
78 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \ 72 V(TO_INT32_FUN_INDEX, JSFunction, to_int32_fun) \
79 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \ 73 V(GLOBAL_EVAL_FUN_INDEX, JSFunction, global_eval_fun) \
80 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \ 74 V(INSTANTIATE_FUN_INDEX, JSFunction, instantiate_fun) \
81 V(CONFIGURE_INSTANCE_FUN_INDEX, JSFunction, configure_instance_fun) \ 75 V(CONFIGURE_INSTANCE_FUN_INDEX, JSFunction, configure_instance_fun) \
82 V(FUNCTION_MAP_INDEX, Map, function_map) \ 76 V(FUNCTION_MAP_INDEX, Map, function_map) \
83 V(FUNCTION_INSTANCE_MAP_INDEX, Map, function_instance_map) \ 77 V(FUNCTION_INSTANCE_MAP_INDEX, Map, function_instance_map) \
84 V(JS_ARRAY_MAP_INDEX, Map, js_array_map)\ 78 V(JS_ARRAY_MAP_INDEX, Map, js_array_map)\
85 V(SPECIAL_FUNCTION_TABLE_INDEX, FixedArray, special_function_table) \
86 V(ARGUMENTS_BOILERPLATE_INDEX, JSObject, arguments_boilerplate) \ 79 V(ARGUMENTS_BOILERPLATE_INDEX, JSObject, arguments_boilerplate) \
87 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \ 80 V(MESSAGE_LISTENERS_INDEX, JSObject, message_listeners) \
88 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \ 81 V(MAKE_MESSAGE_FUN_INDEX, JSFunction, make_message_fun) \
89 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \ 82 V(GET_STACK_TRACE_LINE_INDEX, JSFunction, get_stack_trace_line_fun) \
90 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \ 83 V(CONFIGURE_GLOBAL_INDEX, JSFunction, configure_global_fun) \
91 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \ 84 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \
92 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \ 85 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
93 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 86 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
94 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 87 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
95 call_as_constructor_delegate) \ 88 call_as_constructor_delegate) \
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 TO_STRING_FUN_INDEX, 191 TO_STRING_FUN_INDEX,
199 TO_DETAIL_STRING_FUN_INDEX, 192 TO_DETAIL_STRING_FUN_INDEX,
200 TO_OBJECT_FUN_INDEX, 193 TO_OBJECT_FUN_INDEX,
201 TO_INTEGER_FUN_INDEX, 194 TO_INTEGER_FUN_INDEX,
202 TO_UINT32_FUN_INDEX, 195 TO_UINT32_FUN_INDEX,
203 TO_INT32_FUN_INDEX, 196 TO_INT32_FUN_INDEX,
204 TO_BOOLEAN_FUN_INDEX, 197 TO_BOOLEAN_FUN_INDEX,
205 GLOBAL_EVAL_FUN_INDEX, 198 GLOBAL_EVAL_FUN_INDEX,
206 INSTANTIATE_FUN_INDEX, 199 INSTANTIATE_FUN_INDEX,
207 CONFIGURE_INSTANCE_FUN_INDEX, 200 CONFIGURE_INSTANCE_FUN_INDEX,
208 SPECIAL_FUNCTION_TABLE_INDEX,
209 MESSAGE_LISTENERS_INDEX, 201 MESSAGE_LISTENERS_INDEX,
210 MAKE_MESSAGE_FUN_INDEX, 202 MAKE_MESSAGE_FUN_INDEX,
211 GET_STACK_TRACE_LINE_INDEX, 203 GET_STACK_TRACE_LINE_INDEX,
212 CONFIGURE_GLOBAL_INDEX, 204 CONFIGURE_GLOBAL_INDEX,
213 FUNCTION_CACHE_INDEX, 205 FUNCTION_CACHE_INDEX,
214 RUNTIME_CONTEXT_INDEX, 206 RUNTIME_CONTEXT_INDEX,
215 CALL_AS_FUNCTION_DELEGATE_INDEX, 207 CALL_AS_FUNCTION_DELEGATE_INDEX,
216 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 208 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
217 SCRIPT_FUNCTION_INDEX, 209 SCRIPT_FUNCTION_INDEX,
218 OPAQUE_REFERENCE_FUNCTION_INDEX, 210 OPAQUE_REFERENCE_FUNCTION_INDEX,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 #ifdef DEBUG 327 #ifdef DEBUG
336 // Bootstrapping-aware type checks. 328 // Bootstrapping-aware type checks.
337 static bool IsBootstrappingOrContext(Object* object); 329 static bool IsBootstrappingOrContext(Object* object);
338 static bool IsBootstrappingOrGlobalObject(Object* object); 330 static bool IsBootstrappingOrGlobalObject(Object* object);
339 #endif 331 #endif
340 }; 332 };
341 333
342 } } // namespace v8::internal 334 } } // namespace v8::internal
343 335
344 #endif // V8_CONTEXTS_H_ 336 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/conversions.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698