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

Side by Side Diff: src/objects.h

Issue 10694155: Renamed ConvertDescriptorToFieldAndMapTransition to ConvertTransitionToMapTransition, and let it re… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | 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 // 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 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 Isolate* isolate, 1931 Isolate* isolate,
1932 ElementsKind elements_kind); 1932 ElementsKind elements_kind);
1933 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow( 1933 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow(
1934 ElementsKind elements_kind); 1934 ElementsKind elements_kind);
1935 1935
1936 static Handle<Object> TransitionElementsKind(Handle<JSObject> object, 1936 static Handle<Object> TransitionElementsKind(Handle<JSObject> object,
1937 ElementsKind to_kind); 1937 ElementsKind to_kind);
1938 1938
1939 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); 1939 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind);
1940 1940
1941 // Converts a descriptor of any other type to a real field, 1941 // Replaces an existing transition with a transition to a map with a FIELD.
1942 // backed by the properties array. Descriptors of visible 1942 MUST_USE_RESULT MaybeObject* ConvertTransitionToMapTransition(
1943 // types, such as CONSTANT_FUNCTION, keep their enumeration order. 1943 int transition_index,
1944 // Converts the descriptor on the original object's map to a
1945 // map transition, and the the new field is on the object's new map.
1946 MUST_USE_RESULT MaybeObject* ConvertDescriptorToFieldAndMapTransition(
1947 String* name, 1944 String* name,
1948 Object* new_value, 1945 Object* new_value,
1949 PropertyAttributes attributes); 1946 PropertyAttributes attributes);
1950 1947
1951 // Converts a descriptor of any other type to a real field, 1948 // Converts a descriptor of any other type to a real field, backed by the
1952 // backed by the properties array. Descriptors of visible 1949 // properties array.
1953 // types, such as CONSTANT_FUNCTION, keep their enumeration order.
1954 MUST_USE_RESULT MaybeObject* ConvertDescriptorToField( 1950 MUST_USE_RESULT MaybeObject* ConvertDescriptorToField(
1955 String* name, 1951 String* name,
1956 Object* new_value, 1952 Object* new_value,
1957 PropertyAttributes attributes); 1953 PropertyAttributes attributes);
1958 1954
1959 // Add a property to a fast-case object. 1955 // Add a property to a fast-case object.
1960 MUST_USE_RESULT MaybeObject* AddFastProperty( 1956 MUST_USE_RESULT MaybeObject* AddFastProperty(
1961 String* name, 1957 String* name,
1962 Object* value, 1958 Object* value,
1963 PropertyAttributes attributes, 1959 PropertyAttributes attributes,
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
4804 4800
4805 static bool IsValidElementsTransition(ElementsKind from_kind, 4801 static bool IsValidElementsTransition(ElementsKind from_kind,
4806 ElementsKind to_kind); 4802 ElementsKind to_kind);
4807 4803
4808 inline bool HasTransitionArray(); 4804 inline bool HasTransitionArray();
4809 inline bool HasElementsTransition(); 4805 inline bool HasElementsTransition();
4810 inline Map* elements_transition_map(); 4806 inline Map* elements_transition_map();
4811 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( 4807 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map(
4812 Map* transitioned_map); 4808 Map* transitioned_map);
4813 inline TransitionArray* transitions(); 4809 inline TransitionArray* transitions();
4814 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, 4810 inline void SetTransition(int index, Object* value);
4815 Object* value); 4811 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, Object* value);
4816 MUST_USE_RESULT inline MaybeObject* set_transitions( 4812 MUST_USE_RESULT inline MaybeObject* set_transitions(
4817 TransitionArray* transitions); 4813 TransitionArray* transitions);
4818 inline void ClearTransitions(Heap* heap, 4814 inline void ClearTransitions(Heap* heap,
4819 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 4815 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
4820 4816
4821 // Tells whether the map is attached to SharedFunctionInfo 4817 // Tells whether the map is attached to SharedFunctionInfo
4822 // (for inobject slack tracking). 4818 // (for inobject slack tracking).
4823 inline void set_attached_to_shared_function_info(bool value); 4819 inline void set_attached_to_shared_function_info(bool value);
4824 4820
4825 inline bool attached_to_shared_function_info(); 4821 inline bool attached_to_shared_function_info();
(...skipping 4059 matching lines...) Expand 10 before | Expand all | Expand 10 after
8885 } else { 8881 } else {
8886 value &= ~(1 << bit_position); 8882 value &= ~(1 << bit_position);
8887 } 8883 }
8888 return value; 8884 return value;
8889 } 8885 }
8890 }; 8886 };
8891 8887
8892 } } // namespace v8::internal 8888 } } // namespace v8::internal
8893 8889
8894 #endif // V8_OBJECTS_H_ 8890 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698