deps: patch V8 to 7.0.276.38
Refs: https://github.com/v8/v8/compare/7.0.276.36...7.0.276.38 PR-URL: https://github.com/nodejs/node/pull/24271 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
e83d7e8d88
commit
f0f1a28c07
2
deps/v8/include/v8-version.h
vendored
2
deps/v8/include/v8-version.h
vendored
@ -11,7 +11,7 @@
|
|||||||
#define V8_MAJOR_VERSION 7
|
#define V8_MAJOR_VERSION 7
|
||||||
#define V8_MINOR_VERSION 0
|
#define V8_MINOR_VERSION 0
|
||||||
#define V8_BUILD_NUMBER 276
|
#define V8_BUILD_NUMBER 276
|
||||||
#define V8_PATCH_LEVEL 36
|
#define V8_PATCH_LEVEL 38
|
||||||
|
|
||||||
// Use 1 for candidates and 0 otherwise.
|
// Use 1 for candidates and 0 otherwise.
|
||||||
// (Boolean macro values are not supported by all preprocessors.)
|
// (Boolean macro values are not supported by all preprocessors.)
|
||||||
|
58
deps/v8/src/wasm/module-compiler.cc
vendored
58
deps/v8/src/wasm/module-compiler.cc
vendored
@ -2329,12 +2329,6 @@ void AsyncCompileJob::CancelPendingForegroundTask() {
|
|||||||
pending_foreground_task_ = nullptr;
|
pending_foreground_task_ = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Step, typename... Args>
|
|
||||||
void AsyncCompileJob::DoSync(Args&&... args) {
|
|
||||||
NextStep<Step>(std::forward<Args>(args)...);
|
|
||||||
StartForegroundTask();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AsyncCompileJob::StartBackgroundTask() {
|
void AsyncCompileJob::StartBackgroundTask() {
|
||||||
auto task = base::make_unique<CompileTask>(this, false);
|
auto task = base::make_unique<CompileTask>(this, false);
|
||||||
|
|
||||||
@ -2347,6 +2341,18 @@ void AsyncCompileJob::StartBackgroundTask() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Step, typename... Args>
|
||||||
|
void AsyncCompileJob::DoSync(Args&&... args) {
|
||||||
|
NextStep<Step>(std::forward<Args>(args)...);
|
||||||
|
StartForegroundTask();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename Step, typename... Args>
|
||||||
|
void AsyncCompileJob::DoImmediately(Args&&... args) {
|
||||||
|
NextStep<Step>(std::forward<Args>(args)...);
|
||||||
|
ExecuteForegroundTaskImmediately();
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Step, typename... Args>
|
template <typename Step, typename... Args>
|
||||||
void AsyncCompileJob::DoAsync(Args&&... args) {
|
void AsyncCompileJob::DoAsync(Args&&... args) {
|
||||||
NextStep<Step>(std::forward<Args>(args)...);
|
NextStep<Step>(std::forward<Args>(args)...);
|
||||||
@ -2686,11 +2692,10 @@ bool AsyncStreamingProcessor::ProcessCodeSectionHeader(size_t functions_count,
|
|||||||
FinishAsyncCompileJobWithError(decoder_.FinishDecoding(false));
|
FinishAsyncCompileJobWithError(decoder_.FinishDecoding(false));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
job_->NextStep<AsyncCompileJob::PrepareAndStartCompile>(
|
|
||||||
decoder_.shared_module(), false);
|
|
||||||
// Execute the PrepareAndStartCompile step immediately and not in a separate
|
// Execute the PrepareAndStartCompile step immediately and not in a separate
|
||||||
// task.
|
// task.
|
||||||
job_->ExecuteForegroundTaskImmediately();
|
job_->DoImmediately<AsyncCompileJob::PrepareAndStartCompile>(
|
||||||
|
decoder_.shared_module(), false);
|
||||||
|
|
||||||
job_->native_module_->compilation_state()->SetNumberOfFunctionsToCompile(
|
job_->native_module_->compilation_state()->SetNumberOfFunctionsToCompile(
|
||||||
functions_count);
|
functions_count);
|
||||||
@ -2734,25 +2739,26 @@ void AsyncStreamingProcessor::OnFinishedChunk() {
|
|||||||
// Finish the processing of the stream.
|
// Finish the processing of the stream.
|
||||||
void AsyncStreamingProcessor::OnFinishedStream(OwnedVector<uint8_t> bytes) {
|
void AsyncStreamingProcessor::OnFinishedStream(OwnedVector<uint8_t> bytes) {
|
||||||
TRACE_STREAMING("Finish stream...\n");
|
TRACE_STREAMING("Finish stream...\n");
|
||||||
if (job_->native_module_) {
|
|
||||||
job_->wire_bytes_ = ModuleWireBytes(bytes.as_vector());
|
|
||||||
job_->native_module_->set_wire_bytes(std::move(bytes));
|
|
||||||
}
|
|
||||||
ModuleResult result = decoder_.FinishDecoding(false);
|
ModuleResult result = decoder_.FinishDecoding(false);
|
||||||
DCHECK(result.ok());
|
DCHECK(result.ok());
|
||||||
if (job_->DecrementAndCheckFinisherCount()) {
|
bool needs_finish = job_->DecrementAndCheckFinisherCount();
|
||||||
if (job_->native_module_ == nullptr) {
|
if (job_->native_module_ == nullptr) {
|
||||||
// We are processing a WebAssembly module without code section. We need to
|
// We are processing a WebAssembly module without code section. We need to
|
||||||
// prepare compilation first before we can finish it.
|
// prepare compilation first before we can finish it.
|
||||||
// {PrepareAndStartCompile} will call {FinishCompile} by itself if there
|
// {PrepareAndStartCompile} will call {FinishCompile} by itself if there
|
||||||
// is no code section.
|
// is no code section.
|
||||||
job_->DoSync<AsyncCompileJob::PrepareAndStartCompile>(result.val, true);
|
DCHECK(needs_finish);
|
||||||
} else {
|
needs_finish = false;
|
||||||
HandleScope scope(job_->isolate_);
|
job_->DoImmediately<AsyncCompileJob::PrepareAndStartCompile>(result.val,
|
||||||
SaveContext saved_context(job_->isolate_);
|
true);
|
||||||
job_->isolate_->set_context(*job_->native_context_);
|
}
|
||||||
job_->FinishCompile();
|
job_->wire_bytes_ = ModuleWireBytes(bytes.as_vector());
|
||||||
}
|
job_->native_module_->set_wire_bytes(std::move(bytes));
|
||||||
|
if (needs_finish) {
|
||||||
|
HandleScope scope(job_->isolate_);
|
||||||
|
SaveContext saved_context(job_->isolate_);
|
||||||
|
job_->isolate_->set_context(*job_->native_context_);
|
||||||
|
job_->FinishCompile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
deps/v8/src/wasm/module-compiler.h
vendored
4
deps/v8/src/wasm/module-compiler.h
vendored
@ -126,6 +126,10 @@ class AsyncCompileJob {
|
|||||||
template <typename Step, typename... Args>
|
template <typename Step, typename... Args>
|
||||||
void DoSync(Args&&... args);
|
void DoSync(Args&&... args);
|
||||||
|
|
||||||
|
// Switches to the compilation step {Step} and immediately executes that step.
|
||||||
|
template <typename Step, typename... Args>
|
||||||
|
void DoImmediately(Args&&... args);
|
||||||
|
|
||||||
// Switches to the compilation step {Step} and starts a background task to
|
// Switches to the compilation step {Step} and starts a background task to
|
||||||
// execute it.
|
// execute it.
|
||||||
template <typename Step, typename... Args>
|
template <typename Step, typename... Args>
|
||||||
|
15
deps/v8/test/mjsunit/regress/regress-897366.js
vendored
Normal file
15
deps/v8/test/mjsunit/regress/regress-897366.js
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// Flags: --gc-interval=100
|
||||||
|
|
||||||
|
let xs = [];
|
||||||
|
for (let i = 0; i < 205; ++i) {
|
||||||
|
xs.push(i);
|
||||||
|
}
|
||||||
|
xs.sort((a, b) => {
|
||||||
|
xs.shift();
|
||||||
|
xs[xs.length] = -246;
|
||||||
|
return a - b;
|
||||||
|
});
|
7
deps/v8/test/mjsunit/wasm/async-compile.js
vendored
7
deps/v8/test/mjsunit/wasm/async-compile.js
vendored
@ -70,3 +70,10 @@ assertPromiseResult(async function badFunctionInTheMiddle() {
|
|||||||
let buffer = builder.toBuffer();
|
let buffer = builder.toBuffer();
|
||||||
await assertCompileError(buffer);
|
await assertCompileError(buffer);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
assertPromiseResult(async function importWithoutCode() {
|
||||||
|
// Regression test for https://crbug.com/898310.
|
||||||
|
let builder = new WasmModuleBuilder();
|
||||||
|
builder.addImport('m', 'q', kSig_i_i);
|
||||||
|
await builder.asyncInstantiate({'m': {'q': i => i}});
|
||||||
|
}());
|
||||||
|
97
deps/v8/third_party/v8/builtins/array-sort.tq
vendored
97
deps/v8/third_party/v8/builtins/array-sort.tq
vendored
@ -826,7 +826,7 @@ module array {
|
|||||||
assert(i >= 0);
|
assert(i >= 0);
|
||||||
assert(i == stack_size - 2 || i == stack_size - 3);
|
assert(i == stack_size - 2 || i == stack_size - 3);
|
||||||
|
|
||||||
const elements: HeapObject = ReloadElements(sortState);
|
let elements: HeapObject = ReloadElements(sortState);
|
||||||
const Load: LoadFn = GetLoadFn(sortState);
|
const Load: LoadFn = GetLoadFn(sortState);
|
||||||
|
|
||||||
const pending_runs: FixedArray =
|
const pending_runs: FixedArray =
|
||||||
@ -859,6 +859,7 @@ module array {
|
|||||||
const k: Smi = CallGallopRight(
|
const k: Smi = CallGallopRight(
|
||||||
context, sortState, Load, key_right, base_a, length_a, 0, False)
|
context, sortState, Load, key_right, base_a, length_a, 0, False)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(k >= 0);
|
assert(k >= 0);
|
||||||
|
|
||||||
base_a = base_a + k;
|
base_a = base_a + k;
|
||||||
@ -874,6 +875,7 @@ module array {
|
|||||||
length_b = CallGallopLeft(
|
length_b = CallGallopLeft(
|
||||||
context, sortState, Load, key_left, base_b, length_b, length_b - 1,
|
context, sortState, Load, key_left, base_b, length_b, length_b - 1,
|
||||||
False) otherwise Bailout;
|
False) otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(length_b >= 0);
|
assert(length_b >= 0);
|
||||||
if (length_b == 0) return kSuccess;
|
if (length_b == 0) return kSuccess;
|
||||||
|
|
||||||
@ -893,6 +895,12 @@ module array {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro LoadElementsOrTempArray(
|
||||||
|
useTempArray: Boolean, sortState: FixedArray): HeapObject {
|
||||||
|
return useTempArray == True ? GetTempArray(sortState) :
|
||||||
|
ReloadElements(sortState);
|
||||||
|
}
|
||||||
|
|
||||||
// Locates the proper position of key in a sorted array; if the array contains
|
// Locates the proper position of key in a sorted array; if the array contains
|
||||||
// an element equal to key, return the position immediately to the left of
|
// an element equal to key, return the position immediately to the left of
|
||||||
// the leftmost equal element. (GallopRight does the same except returns the
|
// the leftmost equal element. (GallopRight does the same except returns the
|
||||||
@ -916,25 +924,17 @@ module array {
|
|||||||
assert(length > 0 && base >= 0);
|
assert(length > 0 && base >= 0);
|
||||||
assert(0 <= hint && hint < length);
|
assert(0 <= hint && hint < length);
|
||||||
|
|
||||||
// We cannot leave a pointer to elements on the stack (see comment at
|
|
||||||
// ReloadElements). For this reason we pass a flag whether to reload
|
|
||||||
// and which array to use.
|
|
||||||
let elements: HeapObject = useTempArray == True ? GetTempArray(sortState) :
|
|
||||||
ReloadElements(sortState);
|
|
||||||
|
|
||||||
let last_ofs: Smi = 0;
|
let last_ofs: Smi = 0;
|
||||||
let offset: Smi = 1;
|
let offset: Smi = 1;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const base_hint_element: Object =
|
const base_hint_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState), base + hint)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
let order: Number =
|
let order: Number =
|
||||||
CallCompareFn(context, sortState, base_hint_element, key)
|
CallCompareFn(context, sortState, base_hint_element, key)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order < 0) {
|
if (order < 0) {
|
||||||
// a[base + hint] < key: gallop right, until
|
// a[base + hint] < key: gallop right, until
|
||||||
@ -943,14 +943,13 @@ module array {
|
|||||||
// a[base + length - 1] is highest.
|
// a[base + length - 1] is highest.
|
||||||
let max_ofs: Smi = length - hint;
|
let max_ofs: Smi = length - hint;
|
||||||
while (offset < max_ofs) {
|
while (offset < max_ofs) {
|
||||||
const offset_element: Object =
|
const offset_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint + offset)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState),
|
||||||
|
base + hint + offset)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, offset_element, key)
|
order = CallCompareFn(context, sortState, offset_element, key)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
// a[base + hint + offset] >= key? Break.
|
// a[base + hint + offset] >= key? Break.
|
||||||
if (order >= 0) break;
|
if (order >= 0) break;
|
||||||
@ -975,14 +974,13 @@ module array {
|
|||||||
// a[base + hint] is lowest.
|
// a[base + hint] is lowest.
|
||||||
let max_ofs: Smi = hint + 1;
|
let max_ofs: Smi = hint + 1;
|
||||||
while (offset < max_ofs) {
|
while (offset < max_ofs) {
|
||||||
const offset_element: Object =
|
const offset_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint - offset)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState),
|
||||||
|
base + hint - offset)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, offset_element, key)
|
order = CallCompareFn(context, sortState, offset_element, key)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order < 0) break;
|
if (order < 0) break;
|
||||||
|
|
||||||
@ -1011,14 +1009,12 @@ module array {
|
|||||||
while (last_ofs < offset) {
|
while (last_ofs < offset) {
|
||||||
const m: Smi = last_ofs + ((offset - last_ofs) >>> 1);
|
const m: Smi = last_ofs + ((offset - last_ofs) >>> 1);
|
||||||
|
|
||||||
const base_m_element: Object =
|
const base_m_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + m)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState), base + m)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, base_m_element, key)
|
order = CallCompareFn(context, sortState, base_m_element, key)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order < 0) {
|
if (order < 0) {
|
||||||
last_ofs = m + 1; // a[base + m] < key.
|
last_ofs = m + 1; // a[base + m] < key.
|
||||||
@ -1051,25 +1047,17 @@ module array {
|
|||||||
assert(length > 0 && base >= 0);
|
assert(length > 0 && base >= 0);
|
||||||
assert(0 <= hint && hint < length);
|
assert(0 <= hint && hint < length);
|
||||||
|
|
||||||
// We cannot leave a pointer to elements on the stack (see comment at
|
|
||||||
// ReloadElements). For this reason we pass a flag whether to reload
|
|
||||||
// and which array to use.
|
|
||||||
let elements: HeapObject = useTempArray == True ? GetTempArray(sortState) :
|
|
||||||
ReloadElements(sortState);
|
|
||||||
|
|
||||||
let last_ofs: Smi = 0;
|
let last_ofs: Smi = 0;
|
||||||
let offset: Smi = 1;
|
let offset: Smi = 1;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const base_hint_element: Object =
|
const base_hint_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState), base + hint)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
let order: Number =
|
let order: Number =
|
||||||
CallCompareFn(context, sortState, key, base_hint_element)
|
CallCompareFn(context, sortState, key, base_hint_element)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order < 0) {
|
if (order < 0) {
|
||||||
// key < a[base + hint]: gallop left, until
|
// key < a[base + hint]: gallop left, until
|
||||||
@ -1078,14 +1066,13 @@ module array {
|
|||||||
// a[base + hint] is lowest.
|
// a[base + hint] is lowest.
|
||||||
let max_ofs: Smi = hint + 1;
|
let max_ofs: Smi = hint + 1;
|
||||||
while (offset < max_ofs) {
|
while (offset < max_ofs) {
|
||||||
const offset_element: Object =
|
const offset_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint - offset)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState),
|
||||||
|
base + hint - offset)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, key, offset_element)
|
order = CallCompareFn(context, sortState, key, offset_element)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order >= 0) break;
|
if (order >= 0) break;
|
||||||
|
|
||||||
@ -1109,14 +1096,13 @@ module array {
|
|||||||
// a[base + length - 1] is highest.
|
// a[base + length - 1] is highest.
|
||||||
let max_ofs: Smi = length - hint;
|
let max_ofs: Smi = length - hint;
|
||||||
while (offset < max_ofs) {
|
while (offset < max_ofs) {
|
||||||
const offset_element: Object =
|
const offset_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + hint + offset)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState),
|
||||||
|
base + hint + offset)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, key, offset_element)
|
order = CallCompareFn(context, sortState, key, offset_element)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
// a[base + hint + ofs] <= key.
|
// a[base + hint + ofs] <= key.
|
||||||
if (order < 0) break;
|
if (order < 0) break;
|
||||||
@ -1144,14 +1130,12 @@ module array {
|
|||||||
while (last_ofs < offset) {
|
while (last_ofs < offset) {
|
||||||
const m: Smi = last_ofs + ((offset - last_ofs) >>> 1);
|
const m: Smi = last_ofs + ((offset - last_ofs) >>> 1);
|
||||||
|
|
||||||
const base_m_element: Object =
|
const base_m_element: Object = CallLoad(
|
||||||
CallLoad(context, sortState, Load, elements, base + m)
|
context, sortState, Load,
|
||||||
|
LoadElementsOrTempArray(useTempArray, sortState), base + m)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
order = CallCompareFn(context, sortState, key, base_m_element)
|
order = CallCompareFn(context, sortState, key, base_m_element)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
if (useTempArray == False) {
|
|
||||||
elements = ReloadElements(sortState);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order < 0) {
|
if (order < 0) {
|
||||||
offset = m; // key < a[base + m].
|
offset = m; // key < a[base + m].
|
||||||
@ -1288,6 +1272,7 @@ module array {
|
|||||||
nof_wins_a = CallGallopRight(
|
nof_wins_a = CallGallopRight(
|
||||||
context, sortState, Load<TempArrayElements>, key_right,
|
context, sortState, Load<TempArrayElements>, key_right,
|
||||||
cursor_temp, length_a, 0, True) otherwise Bailout;
|
cursor_temp, length_a, 0, True) otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(nof_wins_a >= 0);
|
assert(nof_wins_a >= 0);
|
||||||
|
|
||||||
if (nof_wins_a > 0) {
|
if (nof_wins_a > 0) {
|
||||||
@ -1313,6 +1298,7 @@ module array {
|
|||||||
context, sortState, LoadF, temp_array[cursor_temp], cursor_b,
|
context, sortState, LoadF, temp_array[cursor_temp], cursor_b,
|
||||||
length_b, 0, False)
|
length_b, 0, False)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(nof_wins_b >= 0);
|
assert(nof_wins_b >= 0);
|
||||||
if (nof_wins_b > 0) {
|
if (nof_wins_b > 0) {
|
||||||
CallCopyWithinSortArray(
|
CallCopyWithinSortArray(
|
||||||
@ -1461,6 +1447,7 @@ module array {
|
|||||||
context, sortState, LoadF, temp_array[cursor_temp], baseA,
|
context, sortState, LoadF, temp_array[cursor_temp], baseA,
|
||||||
length_a, length_a - 1, False)
|
length_a, length_a - 1, False)
|
||||||
otherwise Bailout;
|
otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(k >= 0);
|
assert(k >= 0);
|
||||||
nof_wins_a = length_a - k;
|
nof_wins_a = length_a - k;
|
||||||
|
|
||||||
@ -1487,6 +1474,7 @@ module array {
|
|||||||
k = CallGallopLeft(
|
k = CallGallopLeft(
|
||||||
context, sortState, Load<TempArrayElements>, key, 0, length_b,
|
context, sortState, Load<TempArrayElements>, key, 0, length_b,
|
||||||
length_b - 1, True) otherwise Bailout;
|
length_b - 1, True) otherwise Bailout;
|
||||||
|
elements = ReloadElements(sortState);
|
||||||
assert(k >= 0);
|
assert(k >= 0);
|
||||||
nof_wins_b = length_b - k;
|
nof_wins_b = length_b - k;
|
||||||
|
|
||||||
@ -1743,8 +1731,7 @@ module array {
|
|||||||
// 2. Let obj be ? ToObject(this value).
|
// 2. Let obj be ? ToObject(this value).
|
||||||
const obj: JSReceiver = ToObject(context, receiver);
|
const obj: JSReceiver = ToObject(context, receiver);
|
||||||
|
|
||||||
const sort_state: FixedArray =
|
const sort_state: FixedArray = AllocateZeroedFixedArray(kSortStateSize);
|
||||||
AllocateZeroedFixedArray(kSortStateSize);
|
|
||||||
FillFixedArrayWithSmiZero(sort_state, SmiTag(kSortStateSize));
|
FillFixedArrayWithSmiZero(sort_state, SmiTag(kSortStateSize));
|
||||||
|
|
||||||
sort_state[kReceiverIdx] = obj;
|
sort_state[kReceiverIdx] = obj;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user