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

Side by Side Diff: src/objects.h

Issue 260803002: Map::TransitionElementsTo() extracted from JSObject::GetElementsTransitionMap(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/ic.cc ('k') | src/objects.cc » ('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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 // (storage->length() == NumberOfEnumElements()). 2452 // (storage->length() == NumberOfEnumElements()).
2453 // If storage is NULL, will count the elements without adding 2453 // If storage is NULL, will count the elements without adding
2454 // them to any storage. 2454 // them to any storage.
2455 // Returns the number of enumerable elements. 2455 // Returns the number of enumerable elements.
2456 int GetEnumElementKeys(FixedArray* storage); 2456 int GetEnumElementKeys(FixedArray* storage);
2457 2457
2458 // Returns a new map with all transitions dropped from the object's current 2458 // Returns a new map with all transitions dropped from the object's current
2459 // map and the ElementsKind set. 2459 // map and the ElementsKind set.
2460 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, 2460 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object,
2461 ElementsKind to_kind); 2461 ElementsKind to_kind);
2462 static Handle<Map> GetElementsTransitionMapSlow(Handle<JSObject> object,
2463 ElementsKind elements_kind);
2464
2465 static void TransitionElementsKind(Handle<JSObject> object, 2462 static void TransitionElementsKind(Handle<JSObject> object,
2466 ElementsKind to_kind); 2463 ElementsKind to_kind);
2467 2464
2468 // TODO(mstarzinger): Both public because of ConvertAnsSetLocalProperty(). 2465 // TODO(mstarzinger): Both public because of ConvertAnsSetLocalProperty().
2469 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); 2466 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map);
2470 static void GeneralizeFieldRepresentation(Handle<JSObject> object, 2467 static void GeneralizeFieldRepresentation(Handle<JSObject> object,
2471 int modify_index, 2468 int modify_index,
2472 Representation new_representation, 2469 Representation new_representation,
2473 Handle<HeapType> new_field_type, 2470 Handle<HeapType> new_field_type,
2474 StoreMode store_mode); 2471 StoreMode store_mode);
(...skipping 3832 matching lines...) Expand 10 before | Expand all | Expand 10 after
6307 Representation representation, 6304 Representation representation,
6308 TransitionFlag flag); 6305 TransitionFlag flag);
6309 6306
6310 MUST_USE_RESULT static MaybeHandle<Map> CopyWithConstant( 6307 MUST_USE_RESULT static MaybeHandle<Map> CopyWithConstant(
6311 Handle<Map> map, 6308 Handle<Map> map,
6312 Handle<Name> name, 6309 Handle<Name> name,
6313 Handle<Object> constant, 6310 Handle<Object> constant,
6314 PropertyAttributes attributes, 6311 PropertyAttributes attributes,
6315 TransitionFlag flag); 6312 TransitionFlag flag);
6316 6313
6314 // Returns a new map with all transitions dropped from the given map and
6315 // the ElementsKind set.
6316 static Handle<Map> TransitionElementsTo(Handle<Map> map,
6317 ElementsKind to_kind);
6318
6317 static Handle<Map> AsElementsKind(Handle<Map> map, ElementsKind kind); 6319 static Handle<Map> AsElementsKind(Handle<Map> map, ElementsKind kind);
6318 6320
6319 static Handle<Map> CopyAsElementsKind(Handle<Map> map, 6321 static Handle<Map> CopyAsElementsKind(Handle<Map> map,
6320 ElementsKind kind, 6322 ElementsKind kind,
6321 TransitionFlag flag); 6323 TransitionFlag flag);
6322 6324
6323 static Handle<Map> CopyForObserved(Handle<Map> map); 6325 static Handle<Map> CopyForObserved(Handle<Map> map);
6324 6326
6325 static Handle<Map> CopyForFreeze(Handle<Map> map); 6327 static Handle<Map> CopyForFreeze(Handle<Map> map);
6326 6328
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
6568 6570
6569 static Handle<Map> CopyNormalized(Handle<Map> map, 6571 static Handle<Map> CopyNormalized(Handle<Map> map,
6570 PropertyNormalizationMode mode, 6572 PropertyNormalizationMode mode,
6571 NormalizedMapSharingMode sharing); 6573 NormalizedMapSharingMode sharing);
6572 6574
6573 // Fires when the layout of an object with a leaf map changes. 6575 // Fires when the layout of an object with a leaf map changes.
6574 // This includes adding transitions to the leaf map or changing 6576 // This includes adding transitions to the leaf map or changing
6575 // the descriptor array. 6577 // the descriptor array.
6576 inline void NotifyLeafMapLayoutChange(); 6578 inline void NotifyLeafMapLayoutChange();
6577 6579
6580 static Handle<Map> TransitionElementsToSlow(Handle<Map> object,
6581 ElementsKind to_kind);
6582
6578 // Zaps the contents of backing data structures. Note that the 6583 // Zaps the contents of backing data structures. Note that the
6579 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects 6584 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects
6580 // holding weak references when incremental marking is used, because it also 6585 // holding weak references when incremental marking is used, because it also
6581 // iterates over objects that are otherwise unreachable. 6586 // iterates over objects that are otherwise unreachable.
6582 // In general we only want to call these functions in release mode when 6587 // In general we only want to call these functions in release mode when
6583 // heap verification is turned on. 6588 // heap verification is turned on.
6584 void ZapPrototypeTransitions(); 6589 void ZapPrototypeTransitions();
6585 void ZapTransitions(); 6590 void ZapTransitions();
6586 6591
6587 void DeprecateTransitionTree(); 6592 void DeprecateTransitionTree();
(...skipping 4505 matching lines...) Expand 10 before | Expand all | Expand 10 after
11093 } else { 11098 } else {
11094 value &= ~(1 << bit_position); 11099 value &= ~(1 << bit_position);
11095 } 11100 }
11096 return value; 11101 return value;
11097 } 11102 }
11098 }; 11103 };
11099 11104
11100 } } // namespace v8::internal 11105 } } // namespace v8::internal
11101 11106
11102 #endif // V8_OBJECTS_H_ 11107 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698