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

Side by Side Diff: src/objects.h

Issue 1560763002: Add Array support for @@species and subclassing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Some fixes Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 // function is implemented according to ES5, section 9.12 and can be used 1339 // function is implemented according to ES5, section 9.12 and can be used
1340 // to implement the Harmony "egal" function. 1340 // to implement the Harmony "egal" function.
1341 bool SameValue(Object* other); 1341 bool SameValue(Object* other);
1342 1342
1343 // Checks whether this object has the same value as the given one. 1343 // Checks whether this object has the same value as the given one.
1344 // +0 and -0 are treated equal. Everything else is the same as SameValue. 1344 // +0 and -0 are treated equal. Everything else is the same as SameValue.
1345 // This function is implemented according to ES6, section 7.2.4 and is used 1345 // This function is implemented according to ES6, section 7.2.4 and is used
1346 // by ES6 Map and Set. 1346 // by ES6 Map and Set.
1347 bool SameValueZero(Object* other); 1347 bool SameValueZero(Object* other);
1348 1348
1349 // ES6 section 9.4.2.3 ArraySpeciesCreate (part of it)
1350 MUST_USE_RESULT static MaybeHandle<Object> ArraySpeciesConstructor(
1351 Isolate* isolate, Handle<Object> originalArray);
adamk 2016/01/06 00:10:12 Nit: original_array
1352
1349 // Tries to convert an object to an array length. Returns true and sets the 1353 // Tries to convert an object to an array length. Returns true and sets the
1350 // output parameter if it succeeds. 1354 // output parameter if it succeeds.
1351 inline bool ToArrayLength(uint32_t* index); 1355 inline bool ToArrayLength(uint32_t* index);
1352 1356
1353 // Tries to convert an object to an array index. Returns true and sets the 1357 // Tries to convert an object to an array index. Returns true and sets the
1354 // output parameter if it succeeds. Equivalent to ToArrayLength, but does not 1358 // output parameter if it succeeds. Equivalent to ToArrayLength, but does not
1355 // allow kMaxUInt32. 1359 // allow kMaxUInt32.
1356 inline bool ToArrayIndex(uint32_t* index); 1360 inline bool ToArrayIndex(uint32_t* index);
1357 1361
1358 // Returns true if this is a JSValue containing a string and the index is 1362 // Returns true if this is a JSValue containing a string and the index is
(...skipping 9374 matching lines...) Expand 10 before | Expand all | Expand 10 after
10733 } 10737 }
10734 return value; 10738 return value;
10735 } 10739 }
10736 }; 10740 };
10737 10741
10738 10742
10739 } // NOLINT, false-positive due to second-order macros. 10743 } // NOLINT, false-positive due to second-order macros.
10740 } // NOLINT, false-positive due to second-order macros. 10744 } // NOLINT, false-positive due to second-order macros.
10741 10745
10742 #endif // V8_OBJECTS_H_ 10746 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698