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

Side by Side Diff: src/objects.h

Issue 32523008: Handlify JSObject::PrepareElementsForSort (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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') | 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 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. 2105 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
2106 2106
2107 inline bool ShouldTrackAllocationInfo(); 2107 inline bool ShouldTrackAllocationInfo();
2108 2108
2109 inline void set_map_and_elements( 2109 inline void set_map_and_elements(
2110 Map* map, 2110 Map* map,
2111 FixedArrayBase* value, 2111 FixedArrayBase* value,
2112 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 2112 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
2113 2113
2114 // Requires: HasFastElements(). 2114 // Requires: HasFastElements().
2115 static Handle<Object> EnsureWritableFastElements(Handle<JSObject> object);
2115 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); 2116 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements();
2116 2117
2117 // Collects elements starting at index 0. 2118 // Collects elements starting at index 0.
2118 // Undefined values are placed after non-undefined values. 2119 // Undefined values are placed after non-undefined values.
2119 // Returns the number of non-undefined values. 2120 // Returns the number of non-undefined values.
2120 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); 2121 static Handle<Object> PrepareElementsForSort(Handle<JSObject> object,
2122 uint32_t limit);
2121 // As PrepareElementsForSort, but only on objects where elements is 2123 // As PrepareElementsForSort, but only on objects where elements is
2122 // a dictionary, and it will stay a dictionary. 2124 // a dictionary, and it will stay a dictionary.
2125 static Handle<Object> PrepareSlowElementsForSort(Handle<JSObject> object,
2126 uint32_t limit);
2123 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); 2127 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit);
2124 2128
2125 static Handle<Object> GetPropertyWithCallback(Handle<JSObject> object, 2129 static Handle<Object> GetPropertyWithCallback(Handle<JSObject> object,
2126 Handle<Object> receiver, 2130 Handle<Object> receiver,
2127 Handle<Object> structure, 2131 Handle<Object> structure,
2128 Handle<Name> name); 2132 Handle<Name> name);
2129 2133
2130 static Handle<Object> SetPropertyWithCallback( 2134 static Handle<Object> SetPropertyWithCallback(
2131 Handle<JSObject> object, 2135 Handle<JSObject> object,
2132 Handle<Object> structure, 2136 Handle<Object> structure,
(...skipping 8293 matching lines...) Expand 10 before | Expand all | Expand 10 after
10426 } else { 10430 } else {
10427 value &= ~(1 << bit_position); 10431 value &= ~(1 << bit_position);
10428 } 10432 }
10429 return value; 10433 return value;
10430 } 10434 }
10431 }; 10435 };
10432 10436
10433 } } // namespace v8::internal 10437 } } // namespace v8::internal
10434 10438
10435 #endif // V8_OBJECTS_H_ 10439 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698