Commit e4dcbab5 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[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/+/3063504Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76037}
parent 5f9e80eb
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment