[api][fastcall] Small TryCopyAndConvertArrayToCppBuffer fixes
- Add V8_WARN_UNUSED_RESULT to TryCopyAndConvertArrayToCppBuffer methods - Remove --force-slow-path implications in Object::IterationHasObservableEffects Bug: v8:11739 Change-Id: I20dcac1c460c6ee116ff372806cdf8764a99d9f1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063504 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#76037}
This commit is contained in:
parent
5f9e80eb43
commit
e4dcbab5e1
@ -788,17 +788,19 @@ static constexpr CTypeInfo kTypeInfoFloat64 =
|
||||
* returns true on success. `type_info` will be used for conversions.
|
||||
*/
|
||||
template <const CTypeInfo* type_info, typename T>
|
||||
bool V8_EXPORT TryCopyAndConvertArrayToCppBuffer(Local<Array> src, T* dst,
|
||||
uint32_t max_length);
|
||||
bool V8_EXPORT V8_WARN_UNUSED_RESULT TryCopyAndConvertArrayToCppBuffer(
|
||||
Local<Array> src, T* dst, uint32_t max_length);
|
||||
|
||||
template <>
|
||||
inline bool TryCopyAndConvertArrayToCppBuffer<&kTypeInfoInt32, int32_t>(
|
||||
inline bool V8_WARN_UNUSED_RESULT
|
||||
TryCopyAndConvertArrayToCppBuffer<&kTypeInfoInt32, int32_t>(
|
||||
Local<Array> src, int32_t* dst, uint32_t max_length) {
|
||||
return CopyAndConvertArrayToCppBufferInt32(src, dst, max_length);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool TryCopyAndConvertArrayToCppBuffer<&kTypeInfoFloat64, double>(
|
||||
inline bool V8_WARN_UNUSED_RESULT
|
||||
TryCopyAndConvertArrayToCppBuffer<&kTypeInfoFloat64, double>(
|
||||
Local<Array> src, double* dst, uint32_t max_length) {
|
||||
return CopyAndConvertArrayToCppBufferFloat64(src, dst, max_length);
|
||||
}
|
||||
|
@ -1762,10 +1762,6 @@ bool Object::IterationHasObservableEffects() {
|
||||
JSArray array = JSArray::cast(*this);
|
||||
Isolate* isolate = array.GetIsolate();
|
||||
|
||||
#ifdef V8_ENABLE_FORCE_SLOW_PATH
|
||||
if (isolate->force_slow_path()) return true;
|
||||
#endif
|
||||
|
||||
// Check that we have the original ArrayPrototype.
|
||||
i::HandleScope handle_scope(isolate);
|
||||
i::Handle<i::Context> context;
|
||||
|
@ -11,9 +11,6 @@
|
||||
// The test relies on optimizing/deoptimizing at predictable moments, so
|
||||
// it's not suitable for deoptimization fuzzing.
|
||||
// Flags: --deopt-every-n-times=0
|
||||
// The test relies on TryCopyAndConvertArrayToCppBuffer that fails with
|
||||
// --force-slow-path.
|
||||
// Flags: --no-force-slow-path
|
||||
|
||||
d8.file.execute('test/mjsunit/compiler/fast-api-helpers.js');
|
||||
|
||||
|
@ -11,9 +11,6 @@
|
||||
// The test relies on optimizing/deoptimizing at predictable moments, so
|
||||
// it's not suitable for deoptimization fuzzing.
|
||||
// Flags: --deopt-every-n-times=0
|
||||
// The test relies on TryCopyAndConvertArrayToCppBuffer that fails with
|
||||
// --force-slow-path.
|
||||
// Flags: --no-force-slow-path
|
||||
|
||||
d8.file.execute('test/mjsunit/compiler/fast-api-helpers.js');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user