| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f1a21e5 commit 5b358d5
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ | |||
| 11 | 11 | #define V8_MAJOR_VERSION 9 | |
| 12 | 12 | #define V8_MINOR_VERSION 0 | |
| 13 | 13 | #define V8_BUILD_NUMBER 257 | |
| 14 | - #define V8_PATCH_LEVEL 13 | ||
| 14 | + #define V8_PATCH_LEVEL 16 | ||
| 15 | 15 | ||
| 16 | 16 | // Use 1 for candidates and 0 otherwise. | |
| 17 | 17 | // (Boolean macro values are not supported by all preprocessors.) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4907,6 +4907,14 @@ Reduction JSCallReducer::ReduceStringPrototypeIndexOf(Node* node) { | |||
| 4907 | 4907 | Node* position = n.Argument(1); | |
| 4908 | 4908 | new_position = effect = graph()->NewNode( | |
| 4909 | 4909 | simplified()->CheckSmi(p.feedback()), position, effect, control); | |
| 4910 | + | ||
| 4911 | + Node* receiver_length = | ||
| 4912 | + graph()->NewNode(simplified()->StringLength(), new_receiver); | ||
| 4913 | + new_position = graph()->NewNode( | ||
| 4914 | + simplified()->NumberMin(), | ||
| 4915 | + graph()->NewNode(simplified()->NumberMax(), new_position, | ||
| 4916 | + jsgraph()->ZeroConstant()), | ||
| 4917 | + receiver_length); | ||
| 4910 | 4918 | } | |
| 4911 | 4919 | ||
| 4912 | 4920 | NodeProperties::ReplaceEffectInput(node, effect); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1641,8 +1641,15 @@ Handle<Object> Debug::FindSharedFunctionInfoInScript(Handle<Script> script, | |||
| 1641 | 1641 | UnoptimizedCompileFlags::ForScriptCompile(isolate_, *script); | |
| 1642 | 1642 | ParseInfo parse_info(isolate_, flags, &compile_state); | |
| 1643 | 1643 | IsCompiledScope is_compiled_scope; | |
| 1644 | - Compiler::CompileToplevel(&parse_info, script, isolate_, | ||
| 1645 | - &is_compiled_scope); | ||
| 1644 | + const MaybeHandle<SharedFunctionInfo> maybe_result = | ||
| 1645 | + Compiler::CompileToplevel(&parse_info, script, isolate_, | ||
| 1646 | + &is_compiled_scope); | ||
| 1647 | + if (maybe_result.is_null()) { | ||
| 1648 | + if (isolate_->has_pending_exception()) { | ||
| 1649 | + isolate_->clear_pending_exception(); | ||
| 1650 | + } | ||
| 1651 | + break; | ||
| 1652 | + } | ||
| 1646 | 1653 | continue; | |
| 1647 | 1654 | } | |
| 1648 | 1655 | // We found it if it's already compiled. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4027,13 +4027,8 @@ void LiftoffAssembler::emit_i64x2_mul(LiftoffRegister dst, LiftoffRegister lhs, | |||
| 4027 | 4027 | Pmuludq(tmp2.fp(), tmp2.fp(), lhs.fp()); | |
| 4028 | 4028 | Paddq(tmp2.fp(), tmp2.fp(), tmp1.fp()); | |
| 4029 | 4029 | Psllq(tmp2.fp(), tmp2.fp(), 32); | |
| 4030 | - if (CpuFeatures::IsSupported(AVX)) { | ||
| 4031 | - CpuFeatureScope scope(this, AVX); | ||
| 4032 | - vpmuludq(dst.fp(), lhs.fp(), rhs.fp()); | ||
| 4033 | - } else { | ||
| 4034 | - if (dst.fp() != lhs.fp()) movaps(dst.fp(), lhs.fp()); | ||
| 4035 | - pmuludq(dst.fp(), rhs.fp()); | ||
| 4036 | - } | ||
| 4030 | + liftoff::EmitSimdCommutativeBinOp<&Assembler::vpmuludq, &Assembler::pmuludq>( | ||
| 4031 | + this, dst, lhs, rhs); | ||
| 4037 | 4032 | Paddq(dst.fp(), dst.fp(), tmp2.fp()); | |
| 4038 | 4033 | } | |
| 4039 | 4034 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3559,13 +3559,8 @@ void LiftoffAssembler::emit_i64x2_mul(LiftoffRegister dst, LiftoffRegister lhs, | |||
| 3559 | 3559 | Pmuludq(tmp2.fp(), lhs.fp()); | |
| 3560 | 3560 | Paddq(tmp2.fp(), tmp1.fp()); | |
| 3561 | 3561 | Psllq(tmp2.fp(), 32); | |
| 3562 | - if (CpuFeatures::IsSupported(AVX)) { | ||
| 3563 | - CpuFeatureScope scope(this, AVX); | ||
| 3564 | - vpmuludq(dst.fp(), lhs.fp(), rhs.fp()); | ||
| 3565 | - } else { | ||
| 3566 | - if (dst.fp() != lhs.fp()) movaps(dst.fp(), lhs.fp()); | ||
| 3567 | - pmuludq(dst.fp(), rhs.fp()); | ||
| 3568 | - } | ||
| 3562 | + liftoff::EmitSimdCommutativeBinOp<&Assembler::vpmuludq, &Assembler::pmuludq>( | ||
| 3563 | + this, dst, lhs, rhs); | ||
| 3569 | 3564 | Paddq(dst.fp(), tmp2.fp()); | |
| 3570 | 3565 | } | |
| 3571 | 3566 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,25 @@ | |||
| 1 | + // Copyright 2021 the V8 project authors. All rights reserved. | ||
| 2 | + // Use of this source code is governed by a BSD-style license that can be | ||
| 3 | + // found in the LICENSE file. | ||
| 4 | + // | ||
| 5 | + // Flags: --allow-natives-syntax --no-lazy-feedback-allocation | ||
| 6 | + // Flags: --interrupt-budget=100 | ||
| 7 | + | ||
| 8 | + function f() { | ||
| 9 | + return "".indexOf("", 2); | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + %PrepareFunctionForOptimization(f) | ||
| 13 | + assertEquals(f(), 0); | ||
| 14 | + assertEquals(f(), 0); | ||
| 15 | + %OptimizeFunctionOnNextCall(f) | ||
| 16 | + assertEquals(f(), 0); | ||
| 17 | + assertEquals(f(), 0); | ||
| 18 | + | ||
| 19 | + function g() { | ||
| 20 | + return "".indexOf("", 2); | ||
| 21 | + } | ||
| 22 | + for (let i = 0; i < 191; i++) { | ||
| 23 | + // Expect a natural optimization here due to low interrupt budget. | ||
| 24 | + assertEquals(g(), 0); | ||
| 25 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments