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

Side by Side Diff: src/objects.h

Issue 24256004: Handlify JSObject::Freeze method. (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 | « 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 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 bool ReferencesObject(Object* obj); 2539 bool ReferencesObject(Object* obj);
2540 2540
2541 // Casting. 2541 // Casting.
2542 static inline JSObject* cast(Object* obj); 2542 static inline JSObject* cast(Object* obj);
2543 2543
2544 // Disalow further properties to be added to the object. 2544 // Disalow further properties to be added to the object.
2545 static Handle<Object> PreventExtensions(Handle<JSObject> object); 2545 static Handle<Object> PreventExtensions(Handle<JSObject> object);
2546 MUST_USE_RESULT MaybeObject* PreventExtensions(); 2546 MUST_USE_RESULT MaybeObject* PreventExtensions();
2547 2547
2548 // ES5 Object.freeze 2548 // ES5 Object.freeze
2549 MUST_USE_RESULT MaybeObject* Freeze(Isolate* isolate); 2549 static Handle<Object> Freeze(Handle<JSObject> object);
2550
2551 2550
2552 // Called the first time an object is observed with ES7 Object.observe. 2551 // Called the first time an object is observed with ES7 Object.observe.
2553 MUST_USE_RESULT MaybeObject* SetObserved(Isolate* isolate); 2552 MUST_USE_RESULT MaybeObject* SetObserved(Isolate* isolate);
2554 2553
2555 // Copy object. 2554 // Copy object.
2556 static Handle<JSObject> Copy(Handle<JSObject> object); 2555 static Handle<JSObject> Copy(Handle<JSObject> object);
2557 static Handle<JSObject> DeepCopy(Handle<JSObject> object); 2556 static Handle<JSObject> DeepCopy(Handle<JSObject> object);
2558 2557
2559 // Dispatched behavior. 2558 // Dispatched behavior.
2560 void JSObjectShortPrint(StringStream* accumulator); 2559 void JSObjectShortPrint(StringStream* accumulator);
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
3180 3179
3181 bool IsMoreGeneralThan(int verbatim, 3180 bool IsMoreGeneralThan(int verbatim,
3182 int valid, 3181 int valid,
3183 int new_size, 3182 int new_size,
3184 DescriptorArray* other); 3183 DescriptorArray* other);
3185 3184
3186 MUST_USE_RESULT MaybeObject* CopyUpTo(int enumeration_index) { 3185 MUST_USE_RESULT MaybeObject* CopyUpTo(int enumeration_index) {
3187 return CopyUpToAddAttributes(enumeration_index, NONE); 3186 return CopyUpToAddAttributes(enumeration_index, NONE);
3188 } 3187 }
3189 3188
3189 static Handle<DescriptorArray> CopyUpToAddAttributes(
3190 Handle<DescriptorArray> desc,
3191 int enumeration_index,
3192 PropertyAttributes attributes);
3190 MUST_USE_RESULT MaybeObject* CopyUpToAddAttributes( 3193 MUST_USE_RESULT MaybeObject* CopyUpToAddAttributes(
3191 int enumeration_index, 3194 int enumeration_index,
3192 PropertyAttributes attributes); 3195 PropertyAttributes attributes);
3193 3196
3194 // Sort the instance descriptors by the hash codes of their keys. 3197 // Sort the instance descriptors by the hash codes of their keys.
3195 void Sort(); 3198 void Sort();
3196 3199
3197 // Search the instance descriptors for given name. 3200 // Search the instance descriptors for given name.
3198 INLINE(int Search(Name* name, int number_of_own_descriptors)); 3201 INLINE(int Search(Name* name, int number_of_own_descriptors));
3199 3202
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after
5782 // Returns a non-deprecated version of the input. If the input was not 5785 // Returns a non-deprecated version of the input. If the input was not
5783 // deprecated, it is directly returned. Otherwise, the non-deprecated version 5786 // deprecated, it is directly returned. Otherwise, the non-deprecated version
5784 // is found by re-transitioning from the root of the transition tree using the 5787 // is found by re-transitioning from the root of the transition tree using the
5785 // descriptor array of the map. Returns NULL if no updated map is found. 5788 // descriptor array of the map. Returns NULL if no updated map is found.
5786 Map* CurrentMapForDeprecated(); 5789 Map* CurrentMapForDeprecated();
5787 5790
5788 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); 5791 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size);
5789 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); 5792 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors();
5790 static Handle<Map> CopyDropDescriptors(Handle<Map> map); 5793 static Handle<Map> CopyDropDescriptors(Handle<Map> map);
5791 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); 5794 MUST_USE_RESULT MaybeObject* CopyDropDescriptors();
5795 static Handle<Map> CopyReplaceDescriptors(Handle<Map> map,
5796 Handle<DescriptorArray> descriptors,
5797 TransitionFlag flag,
5798 Handle<Name> name);
5792 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors( 5799 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors(
5793 DescriptorArray* descriptors, 5800 DescriptorArray* descriptors,
5794 TransitionFlag flag, 5801 TransitionFlag flag,
5795 Name* name = NULL, 5802 Name* name = NULL,
5796 SimpleTransitionFlag simple_flag = FULL_TRANSITION); 5803 SimpleTransitionFlag simple_flag = FULL_TRANSITION);
5797 static Handle<Map> CopyInstallDescriptors( 5804 static Handle<Map> CopyInstallDescriptors(
5798 Handle<Map> map, 5805 Handle<Map> map,
5799 int new_descriptor, 5806 int new_descriptor,
5800 Handle<DescriptorArray> descriptors); 5807 Handle<DescriptorArray> descriptors);
5801 MUST_USE_RESULT MaybeObject* CopyInstallDescriptors( 5808 MUST_USE_RESULT MaybeObject* CopyInstallDescriptors(
(...skipping 4442 matching lines...) Expand 10 before | Expand all | Expand 10 after
10244 } else { 10251 } else {
10245 value &= ~(1 << bit_position); 10252 value &= ~(1 << bit_position);
10246 } 10253 }
10247 return value; 10254 return value;
10248 } 10255 }
10249 }; 10256 };
10250 10257
10251 } } // namespace v8::internal 10258 } } // namespace v8::internal
10252 10259
10253 #endif // V8_OBJECTS_H_ 10260 #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