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

Side by Side Diff: src/objects.h

Issue 23583052: Handlify JSObject::MigrateInstance and friends. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/hydrogen.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 // return value indicates whether the transition was successful. 2165 // return value indicates whether the transition was successful.
2166 static inline Handle<Map> FindTransitionToField(Handle<Map> map, 2166 static inline Handle<Map> FindTransitionToField(Handle<Map> map,
2167 Handle<Name> key); 2167 Handle<Name> key);
2168 2168
2169 inline int LastAddedFieldIndex(); 2169 inline int LastAddedFieldIndex();
2170 2170
2171 // Extend the receiver with a single fast property appeared first in the 2171 // Extend the receiver with a single fast property appeared first in the
2172 // passed map. This also extends the property backing store if necessary. 2172 // passed map. This also extends the property backing store if necessary.
2173 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); 2173 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map);
2174 2174
2175 // Migrates the given object to a map whose field representations are the
2176 // lowest upper bound of all known representations for that field.
2175 static void MigrateInstance(Handle<JSObject> instance); 2177 static void MigrateInstance(Handle<JSObject> instance);
2176 2178
2179 // Migrates the given object only if the target map is already available,
2180 // or returns an empty handle if such a map is not yet available.
2177 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance); 2181 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance);
2178 inline MUST_USE_RESULT MaybeObject* TryMigrateInstance();
2179 2182
2180 // Can cause GC. 2183 // Can cause GC.
2181 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributesTrampoline( 2184 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributesTrampoline(
2182 Name* key, 2185 Name* key,
2183 Object* value, 2186 Object* value,
2184 PropertyAttributes attributes, 2187 PropertyAttributes attributes,
2185 ValueType value_type = OPTIMAL_REPRESENTATION, 2188 ValueType value_type = OPTIMAL_REPRESENTATION,
2186 StoreMode mode = ALLOW_AS_CONSTANT, 2189 StoreMode mode = ALLOW_AS_CONSTANT,
2187 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK); 2190 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK);
2188 2191
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2462 ElementsKind elements_kind); 2465 ElementsKind elements_kind);
2463 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow( 2466 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow(
2464 ElementsKind elements_kind); 2467 ElementsKind elements_kind);
2465 2468
2466 static void TransitionElementsKind(Handle<JSObject> object, 2469 static void TransitionElementsKind(Handle<JSObject> object,
2467 ElementsKind to_kind); 2470 ElementsKind to_kind);
2468 2471
2469 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); 2472 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind);
2470 MUST_USE_RESULT MaybeObject* UpdateAllocationSite(ElementsKind to_kind); 2473 MUST_USE_RESULT MaybeObject* UpdateAllocationSite(ElementsKind to_kind);
2471 2474
2475 // TODO(mstarzinger): Both public because of ConvertAnsSetLocalProperty().
2472 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); 2476 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map);
2473 MUST_USE_RESULT MaybeObject* MigrateToMap(Map* new_map);
2474 static void GeneralizeFieldRepresentation(Handle<JSObject> object, 2477 static void GeneralizeFieldRepresentation(Handle<JSObject> object,
2475 int modify_index, 2478 int modify_index,
2476 Representation new_representation, 2479 Representation new_representation,
2477 StoreMode store_mode); 2480 StoreMode store_mode);
2478 2481
2479 // Convert the object to use the canonical dictionary 2482 // Convert the object to use the canonical dictionary
2480 // representation. If the object is expected to have additional properties 2483 // representation. If the object is expected to have additional properties
2481 // added this number can be indicated to have the backing store allocated to 2484 // added this number can be indicated to have the backing store allocated to
2482 // an initial capacity for holding these properties. 2485 // an initial capacity for holding these properties.
2483 static void NormalizeProperties(Handle<JSObject> object, 2486 static void NormalizeProperties(Handle<JSObject> object,
(...skipping 7757 matching lines...) Expand 10 before | Expand all | Expand 10 after
10241 } else { 10244 } else {
10242 value &= ~(1 << bit_position); 10245 value &= ~(1 << bit_position);
10243 } 10246 }
10244 return value; 10247 return value;
10245 } 10248 }
10246 }; 10249 };
10247 10250
10248 } } // namespace v8::internal 10251 } } // namespace v8::internal
10249 10252
10250 #endif // V8_OBJECTS_H_ 10253 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698