diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:39:11 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:46:25 +0100 |
commit | 6ca81ad72a3c6fdf16c683335be748f22aaa9a0d (patch) | |
tree | 33c8ee75f729aed76c2c0b89c63f9bf1b4dd66aa /deps/v8/src/objects/string.h | |
parent | 1eee0b8bf8bba39b600fb16a9223e545e3bac2bc (diff) | |
download | android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.gz android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.bz2 android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.zip |
deps: update V8 to 7.9.317.20
PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/string.h')
-rw-r--r-- | deps/v8/src/objects/string.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/v8/src/objects/string.h b/deps/v8/src/objects/string.h index 27bd7e8765..fcdf75a968 100644 --- a/deps/v8/src/objects/string.h +++ b/deps/v8/src/objects/string.h @@ -5,6 +5,8 @@ #ifndef V8_OBJECTS_STRING_H_ #define V8_OBJECTS_STRING_H_ +#include <memory> + #include "src/base/bits.h" #include "src/base/export-template.h" #include "src/objects/instance-type.h" @@ -306,8 +308,6 @@ class String : public TorqueGeneratedString<String, Name> { RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL, int* length_output = nullptr); - bool ComputeArrayIndex(uint32_t* index); - // Externalization. V8_EXPORT_PRIVATE bool MakeExternal( v8::String::ExternalStringResource* resource); @@ -316,8 +316,12 @@ class String : public TorqueGeneratedString<String, Name> { bool SupportsExternalization(); // Conversion. + // "array index": an index allowed by the ES spec for JSArrays. inline bool AsArrayIndex(uint32_t* index); uint32_t inline ToValidIndex(Object number); + // "integer index": the string is the decimal representation of an + // integer in the range of a size_t. Useful for TypedArray accesses. + inline bool AsIntegerIndex(size_t* index); // Trimming. enum TrimMode { kTrim, kTrimStart, kTrimEnd }; @@ -448,6 +452,7 @@ class String : public TorqueGeneratedString<String, Name> { // Slow case of AsArrayIndex. V8_EXPORT_PRIVATE bool SlowAsArrayIndex(uint32_t* index); + V8_EXPORT_PRIVATE bool SlowAsIntegerIndex(size_t* index); // Compute and set the hash code. V8_EXPORT_PRIVATE uint32_t ComputeAndSetHash(); |