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

Side by Side Diff: src/objects.h

Issue 203333004: Handlification of JSArray::SetElementsLength(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 9 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/ic.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 // 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 10010 matching lines...) Expand 10 before | Expand all | Expand 10 after
10021 // Initialize the array with the given capacity. The function may 10021 // Initialize the array with the given capacity. The function may
10022 // fail due to out-of-memory situations, but only if the requested 10022 // fail due to out-of-memory situations, but only if the requested
10023 // capacity is non-zero. 10023 // capacity is non-zero.
10024 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); 10024 static void Initialize(Handle<JSArray> array, int capacity, int length = 0);
10025 10025
10026 // Initializes the array to a certain length. 10026 // Initializes the array to a certain length.
10027 inline bool AllowsSetElementsLength(); 10027 inline bool AllowsSetElementsLength();
10028 // Can cause GC. 10028 // Can cause GC.
10029 static Handle<Object> SetElementsLength(Handle<JSArray> array, 10029 static Handle<Object> SetElementsLength(Handle<JSArray> array,
10030 Handle<Object> length); 10030 Handle<Object> length);
10031 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length);
10032 10031
10033 // Set the content of the array to the content of storage. 10032 // Set the content of the array to the content of storage.
10034 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); 10033 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage);
10035 10034
10036 // Casting. 10035 // Casting.
10037 static inline JSArray* cast(Object* obj); 10036 static inline JSArray* cast(Object* obj);
10038 10037
10039 // Uses handles. Ensures that the fixed array backing the JSArray has at 10038 // Uses handles. Ensures that the fixed array backing the JSArray has at
10040 // least the stated size. 10039 // least the stated size.
10041 inline void EnsureSize(int minimum_size_of_backing_fixed_array); 10040 inline void EnsureSize(int minimum_size_of_backing_fixed_array);
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
10794 } else { 10793 } else {
10795 value &= ~(1 << bit_position); 10794 value &= ~(1 << bit_position);
10796 } 10795 }
10797 return value; 10796 return value;
10798 } 10797 }
10799 }; 10798 };
10800 10799
10801 } } // namespace v8::internal 10800 } } // namespace v8::internal
10802 10801
10803 #endif // V8_OBJECTS_H_ 10802 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698