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

Side by Side Diff: src/contexts.h

Issue 12957004: ES6 symbols: turn symbols into a proper primitive type (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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/code-stubs.cc ('k') | src/d8.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // must always be allocated via Heap::AllocateContext() or 96 // must always be allocated via Heap::AllocateContext() or
97 // Factory::NewContext. 97 // Factory::NewContext.
98 98
99 #define NATIVE_CONTEXT_FIELDS(V) \ 99 #define NATIVE_CONTEXT_FIELDS(V) \
100 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \ 100 V(GLOBAL_PROXY_INDEX, JSObject, global_proxy_object) \
101 V(SECURITY_TOKEN_INDEX, Object, security_token) \ 101 V(SECURITY_TOKEN_INDEX, Object, security_token) \
102 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \ 102 V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
103 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \ 103 V(NUMBER_FUNCTION_INDEX, JSFunction, number_function) \
104 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \ 104 V(STRING_FUNCTION_INDEX, JSFunction, string_function) \
105 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \ 105 V(STRING_FUNCTION_PROTOTYPE_MAP_INDEX, Map, string_function_prototype_map) \
106 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \
106 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \ 107 V(OBJECT_FUNCTION_INDEX, JSFunction, object_function) \
107 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \ 108 V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \
108 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \ 109 V(ARRAY_FUNCTION_INDEX, JSFunction, array_function) \
109 V(JS_ARRAY_MAPS_INDEX, Object, js_array_maps) \ 110 V(JS_ARRAY_MAPS_INDEX, Object, js_array_maps) \
110 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \ 111 V(DATE_FUNCTION_INDEX, JSFunction, date_function) \
111 V(JSON_OBJECT_INDEX, JSObject, json_object) \ 112 V(JSON_OBJECT_INDEX, JSObject, json_object) \
112 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \ 113 V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
113 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 114 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
114 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \ 115 V(CREATE_DATE_FUN_INDEX, JSFunction, create_date_fun) \
115 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \ 116 V(TO_NUMBER_FUN_INDEX, JSFunction, to_number_fun) \
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 call_as_constructor_delegate) \ 150 call_as_constructor_delegate) \
150 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ 151 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
151 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ 152 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
152 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 153 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
153 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \ 154 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
154 V(MAP_CACHE_INDEX, Object, map_cache) \ 155 V(MAP_CACHE_INDEX, Object, map_cache) \
155 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ 156 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \
156 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ 157 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \
157 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ 158 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \
158 error_message_for_code_gen_from_strings) \ 159 error_message_for_code_gen_from_strings) \
159 V(SYMBOL_DELEGATE_INDEX, JSObject, symbol_delegate) \
160 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \ 160 V(TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, JSFunction, \
161 to_complete_property_descriptor) \ 161 to_complete_property_descriptor) \
162 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \ 162 V(DERIVED_HAS_TRAP_INDEX, JSFunction, derived_has_trap) \
163 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \ 163 V(DERIVED_GET_TRAP_INDEX, JSFunction, derived_get_trap) \
164 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \ 164 V(DERIVED_SET_TRAP_INDEX, JSFunction, derived_set_trap) \
165 V(PROXY_ENUMERATE_INDEX, JSFunction, proxy_enumerate) \ 165 V(PROXY_ENUMERATE_INDEX, JSFunction, proxy_enumerate) \
166 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \ 166 V(OBSERVERS_NOTIFY_CHANGE_INDEX, JSFunction, observers_notify_change) \
167 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \ 167 V(OBSERVERS_DELIVER_CHANGES_INDEX, JSFunction, observers_deliver_changes) \
168 V(RANDOM_SEED_INDEX, ByteArray, random_seed) 168 V(RANDOM_SEED_INDEX, ByteArray, random_seed)
169 169
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 STRICT_MODE_FUNCTION_MAP_INDEX, 244 STRICT_MODE_FUNCTION_MAP_INDEX,
245 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 245 FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
246 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, 246 STRICT_MODE_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX,
247 FUNCTION_INSTANCE_MAP_INDEX, 247 FUNCTION_INSTANCE_MAP_INDEX,
248 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX, 248 STRICT_MODE_FUNCTION_INSTANCE_MAP_INDEX,
249 INITIAL_OBJECT_PROTOTYPE_INDEX, 249 INITIAL_OBJECT_PROTOTYPE_INDEX,
250 BOOLEAN_FUNCTION_INDEX, 250 BOOLEAN_FUNCTION_INDEX,
251 NUMBER_FUNCTION_INDEX, 251 NUMBER_FUNCTION_INDEX,
252 STRING_FUNCTION_INDEX, 252 STRING_FUNCTION_INDEX,
253 STRING_FUNCTION_PROTOTYPE_MAP_INDEX, 253 STRING_FUNCTION_PROTOTYPE_MAP_INDEX,
254 SYMBOL_FUNCTION_INDEX,
254 OBJECT_FUNCTION_INDEX, 255 OBJECT_FUNCTION_INDEX,
255 INTERNAL_ARRAY_FUNCTION_INDEX, 256 INTERNAL_ARRAY_FUNCTION_INDEX,
256 ARRAY_FUNCTION_INDEX, 257 ARRAY_FUNCTION_INDEX,
257 JS_ARRAY_MAPS_INDEX, 258 JS_ARRAY_MAPS_INDEX,
258 DATE_FUNCTION_INDEX, 259 DATE_FUNCTION_INDEX,
259 JSON_OBJECT_INDEX, 260 JSON_OBJECT_INDEX,
260 REGEXP_FUNCTION_INDEX, 261 REGEXP_FUNCTION_INDEX,
261 CREATE_DATE_FUN_INDEX, 262 CREATE_DATE_FUN_INDEX,
262 TO_NUMBER_FUN_INDEX, 263 TO_NUMBER_FUN_INDEX,
263 TO_STRING_FUN_INDEX, 264 TO_STRING_FUN_INDEX,
(...skipping 16 matching lines...) Expand all
280 RUNTIME_CONTEXT_INDEX, 281 RUNTIME_CONTEXT_INDEX,
281 CALL_AS_FUNCTION_DELEGATE_INDEX, 282 CALL_AS_FUNCTION_DELEGATE_INDEX,
282 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, 283 CALL_AS_CONSTRUCTOR_DELEGATE_INDEX,
283 SCRIPT_FUNCTION_INDEX, 284 SCRIPT_FUNCTION_INDEX,
284 OPAQUE_REFERENCE_FUNCTION_INDEX, 285 OPAQUE_REFERENCE_FUNCTION_INDEX,
285 CONTEXT_EXTENSION_FUNCTION_INDEX, 286 CONTEXT_EXTENSION_FUNCTION_INDEX,
286 OUT_OF_MEMORY_INDEX, 287 OUT_OF_MEMORY_INDEX,
287 EMBEDDER_DATA_INDEX, 288 EMBEDDER_DATA_INDEX,
288 ALLOW_CODE_GEN_FROM_STRINGS_INDEX, 289 ALLOW_CODE_GEN_FROM_STRINGS_INDEX,
289 ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, 290 ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX,
290 SYMBOL_DELEGATE_INDEX,
291 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX, 291 TO_COMPLETE_PROPERTY_DESCRIPTOR_INDEX,
292 DERIVED_HAS_TRAP_INDEX, 292 DERIVED_HAS_TRAP_INDEX,
293 DERIVED_GET_TRAP_INDEX, 293 DERIVED_GET_TRAP_INDEX,
294 DERIVED_SET_TRAP_INDEX, 294 DERIVED_SET_TRAP_INDEX,
295 PROXY_ENUMERATE_INDEX, 295 PROXY_ENUMERATE_INDEX,
296 OBSERVERS_NOTIFY_CHANGE_INDEX, 296 OBSERVERS_NOTIFY_CHANGE_INDEX,
297 OBSERVERS_DELIVER_CHANGES_INDEX, 297 OBSERVERS_DELIVER_CHANGES_INDEX,
298 RANDOM_SEED_INDEX, 298 RANDOM_SEED_INDEX,
299 299
300 // Properties from here are treated as weak references by the full GC. 300 // Properties from here are treated as weak references by the full GC.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 static bool IsBootstrappingOrGlobalObject(Object* object); 460 static bool IsBootstrappingOrGlobalObject(Object* object);
461 #endif 461 #endif
462 462
463 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 463 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
464 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 464 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
465 }; 465 };
466 466
467 } } // namespace v8::internal 467 } } // namespace v8::internal
468 468
469 #endif // V8_CONTEXTS_H_ 469 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/d8.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698