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

Side by Side Diff: src/objects.h

Issue 11275292: Object.observe: Move notification of JSArray length changes to JSArray::SetElementsLength (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test Created 8 years, 1 month 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/accessors.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 8363 matching lines...) Expand 10 before | Expand all | Expand 10 after
8374 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index, 8374 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index,
8375 Object* value); 8375 Object* value);
8376 8376
8377 // Initialize the array with the given capacity. The function may 8377 // Initialize the array with the given capacity. The function may
8378 // fail due to out-of-memory situations, but only if the requested 8378 // fail due to out-of-memory situations, but only if the requested
8379 // capacity is non-zero. 8379 // capacity is non-zero.
8380 MUST_USE_RESULT MaybeObject* Initialize(int capacity); 8380 MUST_USE_RESULT MaybeObject* Initialize(int capacity);
8381 8381
8382 // Initializes the array to a certain length. 8382 // Initializes the array to a certain length.
8383 inline bool AllowsSetElementsLength(); 8383 inline bool AllowsSetElementsLength();
8384 // Can cause GC.
8384 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); 8385 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length);
8385 8386
8386 // Set the content of the array to the content of storage. 8387 // Set the content of the array to the content of storage.
8387 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); 8388 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage);
8388 8389
8389 // Casting. 8390 // Casting.
8390 static inline JSArray* cast(Object* obj); 8391 static inline JSArray* cast(Object* obj);
8391 8392
8392 // Uses handles. Ensures that the fixed array backing the JSArray has at 8393 // Uses handles. Ensures that the fixed array backing the JSArray has at
8393 // least the stated size. 8394 // least the stated size.
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
9036 } else { 9037 } else {
9037 value &= ~(1 << bit_position); 9038 value &= ~(1 << bit_position);
9038 } 9039 }
9039 return value; 9040 return value;
9040 } 9041 }
9041 }; 9042 };
9042 9043
9043 } } // namespace v8::internal 9044 } } // namespace v8::internal
9044 9045
9045 #endif // V8_OBJECTS_H_ 9046 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698