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

Side by Side Diff: src/objects.h

Issue 350023002: More Map methods moved to private part. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment and rebased Created 6 years, 6 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/api.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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 // Returns the number of enumerable elements. 2419 // Returns the number of enumerable elements.
2420 int GetEnumElementKeys(FixedArray* storage); 2420 int GetEnumElementKeys(FixedArray* storage);
2421 2421
2422 // Returns a new map with all transitions dropped from the object's current 2422 // Returns a new map with all transitions dropped from the object's current
2423 // map and the ElementsKind set. 2423 // map and the ElementsKind set.
2424 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, 2424 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object,
2425 ElementsKind to_kind); 2425 ElementsKind to_kind);
2426 static void TransitionElementsKind(Handle<JSObject> object, 2426 static void TransitionElementsKind(Handle<JSObject> object,
2427 ElementsKind to_kind); 2427 ElementsKind to_kind);
2428 2428
2429 // TODO(mstarzinger): Both public because of ConvertAndSetOwnProperty().
2430 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); 2429 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map);
2431 static void GeneralizeFieldRepresentation(Handle<JSObject> object,
2432 int modify_index,
2433 Representation new_representation,
2434 Handle<HeapType> new_field_type,
2435 StoreMode store_mode);
2436 2430
2437 // Convert the object to use the canonical dictionary 2431 // Convert the object to use the canonical dictionary
2438 // representation. If the object is expected to have additional properties 2432 // representation. If the object is expected to have additional properties
2439 // added this number can be indicated to have the backing store allocated to 2433 // added this number can be indicated to have the backing store allocated to
2440 // an initial capacity for holding these properties. 2434 // an initial capacity for holding these properties.
2441 static void NormalizeProperties(Handle<JSObject> object, 2435 static void NormalizeProperties(Handle<JSObject> object,
2442 PropertyNormalizationMode mode, 2436 PropertyNormalizationMode mode,
2443 int expected_additional_properties); 2437 int expected_additional_properties);
2444 2438
2445 // Convert and update the elements backing store to be a 2439 // Convert and update the elements backing store to be a
2446 // SeededNumberDictionary dictionary. Returns the backing after conversion. 2440 // SeededNumberDictionary dictionary. Returns the backing after conversion.
2447 static Handle<SeededNumberDictionary> NormalizeElements( 2441 static Handle<SeededNumberDictionary> NormalizeElements(
2448 Handle<JSObject> object); 2442 Handle<JSObject> object);
2449 2443
2450 // Transform slow named properties to fast variants. 2444 // Transform slow named properties to fast variants.
2451 static void TransformToFastProperties(Handle<JSObject> object, 2445 static void MigrateSlowToFast(Handle<JSObject> object,
2452 int unused_property_fields); 2446 int unused_property_fields);
2453 2447
2454 // Access fast-case object properties at index. 2448 // Access fast-case object properties at index.
2455 static Handle<Object> FastPropertyAt(Handle<JSObject> object, 2449 static Handle<Object> FastPropertyAt(Handle<JSObject> object,
2456 Representation representation, 2450 Representation representation,
2457 FieldIndex index); 2451 FieldIndex index);
2458 inline Object* RawFastPropertyAt(FieldIndex index); 2452 inline Object* RawFastPropertyAt(FieldIndex index);
2459 inline void FastPropertyAtPut(FieldIndex index, Object* value); 2453 inline void FastPropertyAtPut(FieldIndex index, Object* value);
2460 void WriteToField(int descriptor, Object* value); 2454 void WriteToField(int descriptor, Object* value);
2461 2455
2462 // Access to in object properties. 2456 // Access to in object properties.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 private: 2625 private:
2632 friend class DictionaryElementsAccessor; 2626 friend class DictionaryElementsAccessor;
2633 friend class JSReceiver; 2627 friend class JSReceiver;
2634 friend class Object; 2628 friend class Object;
2635 2629
2636 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); 2630 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map);
2637 static void MigrateFastToSlow(Handle<JSObject> object, 2631 static void MigrateFastToSlow(Handle<JSObject> object,
2638 Handle<Map> new_map, 2632 Handle<Map> new_map,
2639 int expected_additional_properties); 2633 int expected_additional_properties);
2640 2634
2635 static void SetPropertyToField(LookupResult* lookup, Handle<Object> value);
2636
2637 static void ConvertAndSetOwnProperty(LookupResult* lookup,
2638 Handle<Name> name,
2639 Handle<Object> value,
2640 PropertyAttributes attributes);
2641
2642 static void SetPropertyToFieldWithAttributes(LookupResult* lookup,
2643 Handle<Name> name,
2644 Handle<Object> value,
2645 PropertyAttributes attributes);
2646 static void GeneralizeFieldRepresentation(Handle<JSObject> object,
2647 int modify_index,
2648 Representation new_representation,
2649 Handle<HeapType> new_field_type,
2650 StoreMode store_mode);
2651
2641 static void UpdateAllocationSite(Handle<JSObject> object, 2652 static void UpdateAllocationSite(Handle<JSObject> object,
2642 ElementsKind to_kind); 2653 ElementsKind to_kind);
2643 2654
2644 // Used from Object::GetProperty(). 2655 // Used from Object::GetProperty().
2645 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( 2656 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck(
2646 LookupIterator* it); 2657 LookupIterator* it);
2647 2658
2648 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithCallback( 2659 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithCallback(
2649 Handle<JSObject> object, 2660 Handle<JSObject> object,
2650 Handle<Object> receiver, 2661 Handle<Object> receiver,
(...skipping 8501 matching lines...) Expand 10 before | Expand all | Expand 10 after
11152 } else { 11163 } else {
11153 value &= ~(1 << bit_position); 11164 value &= ~(1 << bit_position);
11154 } 11165 }
11155 return value; 11166 return value;
11156 } 11167 }
11157 }; 11168 };
11158 11169
11159 } } // namespace v8::internal 11170 } } // namespace v8::internal
11160 11171
11161 #endif // V8_OBJECTS_H_ 11172 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698