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

Side by Side Diff: src/contexts.h

Issue 384963002: ES6 Unscopables (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap.h" 8 #include "src/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 V(NATIVE_OBJECT_OBSERVE_INDEX, JSFunction, native_object_observe) \ 174 V(NATIVE_OBJECT_OBSERVE_INDEX, JSFunction, native_object_observe) \
175 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, native_object_get_notifier) \ 175 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, native_object_get_notifier) \
176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ 176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \
177 native_object_notifier_perform_change) \ 177 native_object_notifier_perform_change) \
178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ 178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \
179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ 179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \
180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ 180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \
181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ 181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \
182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ 182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \
183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ 183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \
184 V(ITERATOR_SYMBOL_INDEX, Symbol, iterator_symbol) 184 V(ITERATOR_SYMBOL_INDEX, Symbol, iterator_symbol) \
185 V(UNSCOPABLES_SYMBOL_INDEX, Symbol, unscopables_symbol)
185 186
186 // JSFunctions are pairs (context, function code), sometimes also called 187 // JSFunctions are pairs (context, function code), sometimes also called
187 // closures. A Context object is used to represent function contexts and 188 // closures. A Context object is used to represent function contexts and
188 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak). 189 // dynamically pushed 'with' contexts (or 'scopes' in ECMA-262 speak).
189 // 190 //
190 // At runtime, the contexts build a stack in parallel to the execution 191 // At runtime, the contexts build a stack in parallel to the execution
191 // stack, with the top-most context being the current context. All contexts 192 // stack, with the top-most context being the current context. All contexts
192 // have the following slots: 193 // have the following slots:
193 // 194 //
194 // [ closure ] This is the current function. It is the same for all 195 // [ closure ] This is the current function. It is the same for all
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 NATIVE_OBJECT_OBSERVE_INDEX, 350 NATIVE_OBJECT_OBSERVE_INDEX,
350 NATIVE_OBJECT_GET_NOTIFIER_INDEX, 351 NATIVE_OBJECT_GET_NOTIFIER_INDEX,
351 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, 352 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE,
352 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, 353 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX,
353 STRICT_GENERATOR_FUNCTION_MAP_INDEX, 354 STRICT_GENERATOR_FUNCTION_MAP_INDEX,
354 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, 355 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX,
355 ITERATOR_RESULT_MAP_INDEX, 356 ITERATOR_RESULT_MAP_INDEX,
356 MAP_ITERATOR_MAP_INDEX, 357 MAP_ITERATOR_MAP_INDEX,
357 SET_ITERATOR_MAP_INDEX, 358 SET_ITERATOR_MAP_INDEX,
358 ITERATOR_SYMBOL_INDEX, 359 ITERATOR_SYMBOL_INDEX,
360 UNSCOPABLES_SYMBOL_INDEX,
359 361
360 // Properties from here are treated as weak references by the full GC. 362 // Properties from here are treated as weak references by the full GC.
361 // Scavenge treats them as strong references. 363 // Scavenge treats them as strong references.
362 OPTIMIZED_FUNCTIONS_LIST, // Weak. 364 OPTIMIZED_FUNCTIONS_LIST, // Weak.
363 OPTIMIZED_CODE_LIST, // Weak. 365 OPTIMIZED_CODE_LIST, // Weak.
364 DEOPTIMIZED_CODE_LIST, // Weak. 366 DEOPTIMIZED_CODE_LIST, // Weak.
365 MAP_CACHE_INDEX, // Weak. 367 MAP_CACHE_INDEX, // Weak.
366 NEXT_CONTEXT_LINK, // Weak. 368 NEXT_CONTEXT_LINK, // Weak.
367 369
368 // Total number of slots. 370 // Total number of slots.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 544 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
543 #endif 545 #endif
544 546
545 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 547 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
546 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 548 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
547 }; 549 };
548 550
549 } } // namespace v8::internal 551 } } // namespace v8::internal
550 552
551 #endif // V8_CONTEXTS_H_ 553 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.cc » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698