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

Side by Side Diff: src/contexts.h

Issue 712943002: MapCache simplification. It is now a FixedArray that maps number of properties to a WeakCell with... (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | src/factory.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 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/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, 406 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX,
407 STRICT_GENERATOR_FUNCTION_MAP_INDEX, 407 STRICT_GENERATOR_FUNCTION_MAP_INDEX,
408 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, 408 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX,
409 ITERATOR_RESULT_MAP_INDEX, 409 ITERATOR_RESULT_MAP_INDEX,
410 MAP_ITERATOR_MAP_INDEX, 410 MAP_ITERATOR_MAP_INDEX,
411 SET_ITERATOR_MAP_INDEX, 411 SET_ITERATOR_MAP_INDEX,
412 ITERATOR_SYMBOL_INDEX, 412 ITERATOR_SYMBOL_INDEX,
413 UNSCOPABLES_SYMBOL_INDEX, 413 UNSCOPABLES_SYMBOL_INDEX,
414 ARRAY_VALUES_ITERATOR_INDEX, 414 ARRAY_VALUES_ITERATOR_INDEX,
415 GLOBAL_CONTEXT_TABLE_INDEX, 415 GLOBAL_CONTEXT_TABLE_INDEX,
416 MAP_CACHE_INDEX,
416 417
417 // Properties from here are treated as weak references by the full GC. 418 // Properties from here are treated as weak references by the full GC.
418 // Scavenge treats them as strong references. 419 // Scavenge treats them as strong references.
419 OPTIMIZED_FUNCTIONS_LIST, // Weak. 420 OPTIMIZED_FUNCTIONS_LIST, // Weak.
420 OPTIMIZED_CODE_LIST, // Weak. 421 OPTIMIZED_CODE_LIST, // Weak.
421 DEOPTIMIZED_CODE_LIST, // Weak. 422 DEOPTIMIZED_CODE_LIST, // Weak.
422 MAP_CACHE_INDEX, // Weak.
423 NEXT_CONTEXT_LINK, // Weak. 423 NEXT_CONTEXT_LINK, // Weak.
424 424
425 // Total number of slots. 425 // Total number of slots.
426 NATIVE_CONTEXT_SLOTS, 426 NATIVE_CONTEXT_SLOTS,
427 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST 427 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST
428 }; 428 };
429 429
430 // Direct slot access. 430 // Direct slot access.
431 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } 431 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); }
432 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } 432 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 605 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
606 #endif 606 #endif
607 607
608 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 608 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
609 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 609 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
610 }; 610 };
611 611
612 } } // namespace v8::internal 612 } } // namespace v8::internal
613 613
614 #endif // V8_CONTEXTS_H_ 614 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698