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

Side by Side Diff: src/objects.h

Issue 936813002: Contribution of PowerPC port (continuation of 422063005) - PPC dir update 2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « src/json-parser.h ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 5977 matching lines...) Expand 10 before | Expand all | Expand 10 after
5988 return 5988 return
5989 Smi::cast(cache->get(kProtoTransitionNumberOfEntriesOffset))->value(); 5989 Smi::cast(cache->get(kProtoTransitionNumberOfEntriesOffset))->value();
5990 } 5990 }
5991 5991
5992 inline void SetNumberOfProtoTransitions(int value) { 5992 inline void SetNumberOfProtoTransitions(int value) {
5993 FixedArray* cache = GetPrototypeTransitions(); 5993 FixedArray* cache = GetPrototypeTransitions();
5994 DCHECK(cache->length() != 0); 5994 DCHECK(cache->length() != 0);
5995 cache->set(kProtoTransitionNumberOfEntriesOffset, Smi::FromInt(value)); 5995 cache->set(kProtoTransitionNumberOfEntriesOffset, Smi::FromInt(value));
5996 } 5996 }
5997 5997
5998 // Lookup in the map's instance descriptors and fill out the result
5999 // with the given holder if the name is found. The holder may be
6000 // NULL when this function is used from the compiler.
6001 inline void LookupDescriptor(JSObject* holder,
6002 Name* name,
6003 LookupResult* result);
6004
6005 inline void LookupTransition(JSObject* holder, Name* name,
6006 PropertyAttributes attributes,
6007 LookupResult* result);
6008
6009 inline PropertyDetails GetLastDescriptorDetails(); 5998 inline PropertyDetails GetLastDescriptorDetails();
6010 5999
6011 // The size of transition arrays are limited so they do not end up in large 6000 // The size of transition arrays are limited so they do not end up in large
6012 // object space. Otherwise ClearNonLiveTransitions would leak memory while 6001 // object space. Otherwise ClearNonLiveTransitions would leak memory while
6013 // applying in-place right trimming. 6002 // applying in-place right trimming.
6014 inline bool CanHaveMoreTransitions(); 6003 inline bool CanHaveMoreTransitions();
6015 6004
6016 int LastAdded() { 6005 int LastAdded() {
6017 int number_of_own_descriptors = NumberOfOwnDescriptors(); 6006 int number_of_own_descriptors = NumberOfOwnDescriptors();
6018 DCHECK(number_of_own_descriptors > 0); 6007 DCHECK(number_of_own_descriptors > 0);
(...skipping 4289 matching lines...) Expand 10 before | Expand all | Expand 10 after
10308 inline void set_length(Smi* length); 10297 inline void set_length(Smi* length);
10309 10298
10310 static void JSArrayUpdateLengthFromIndex(Handle<JSArray> array, 10299 static void JSArrayUpdateLengthFromIndex(Handle<JSArray> array,
10311 uint32_t index, 10300 uint32_t index,
10312 Handle<Object> value); 10301 Handle<Object> value);
10313 10302
10314 static bool HasReadOnlyLength(Handle<JSArray> array); 10303 static bool HasReadOnlyLength(Handle<JSArray> array);
10315 static bool WouldChangeReadOnlyLength(Handle<JSArray> array, uint32_t index); 10304 static bool WouldChangeReadOnlyLength(Handle<JSArray> array, uint32_t index);
10316 static MaybeHandle<Object> ReadOnlyLengthError(Handle<JSArray> array); 10305 static MaybeHandle<Object> ReadOnlyLengthError(Handle<JSArray> array);
10317 10306
10318 // TODO(adamk): Remove this method in favor of HasReadOnlyLength().
10319 static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map);
10320
10321 // Initialize the array with the given capacity. The function may 10307 // Initialize the array with the given capacity. The function may
10322 // fail due to out-of-memory situations, but only if the requested 10308 // fail due to out-of-memory situations, but only if the requested
10323 // capacity is non-zero. 10309 // capacity is non-zero.
10324 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); 10310 static void Initialize(Handle<JSArray> array, int capacity, int length = 0);
10325 10311
10326 // Initializes the array to a certain length. 10312 // Initializes the array to a certain length.
10327 inline bool AllowsSetElementsLength(); 10313 inline bool AllowsSetElementsLength();
10328 // Can cause GC. 10314 // Can cause GC.
10329 MUST_USE_RESULT static MaybeHandle<Object> SetElementsLength( 10315 MUST_USE_RESULT static MaybeHandle<Object> SetElementsLength(
10330 Handle<JSArray> array, 10316 Handle<JSArray> array,
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
10985 } else { 10971 } else {
10986 value &= ~(1 << bit_position); 10972 value &= ~(1 << bit_position);
10987 } 10973 }
10988 return value; 10974 return value;
10989 } 10975 }
10990 }; 10976 };
10991 10977
10992 } } // namespace v8::internal 10978 } } // namespace v8::internal
10993 10979
10994 #endif // V8_OBJECTS_H_ 10980 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/json-parser.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698