diff options
author | Myles Borins <mylesborins@google.com> | 2019-09-24 11:56:38 -0400 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2019-10-07 03:19:23 -0400 |
commit | f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2 (patch) | |
tree | f5edbccb3ffda2573d70a6e291e7157f290e0ae0 /deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc | |
parent | ffd22e81983056d09c064c59343a0e488236272d (diff) | |
download | android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.gz android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.bz2 android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.zip |
deps: update V8 to 7.8.279.9
PR-URL: https://github.com/nodejs/node/pull/29694
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc')
-rw-r--r-- | deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc b/deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc index eb42c23215..5ee7b90988 100644 --- a/deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc +++ b/deps/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc @@ -34,6 +34,9 @@ namespace internal { * * Each call to a public method should retain this convention. * The stack will have the following structure: + * - Address regexp (address of the JSRegExp object; unused in + * native code, passed to match signature of + * the interpreter) * - Isolate* isolate (address of the current isolate) * - direct_call (if 1, direct call from JavaScript code, if 0 * call through the runtime system) @@ -73,7 +76,8 @@ namespace internal { * int num_capture_registers, * byte* stack_area_base, * bool direct_call = false, - * Isolate* isolate); + * Isolate* isolate + * Address regexp); */ #define __ ACCESS_MASM(masm_) @@ -161,14 +165,12 @@ void RegExpMacroAssemblerIA32::CheckCharacterGT(uc16 limit, Label* on_greater) { BranchOrBacktrack(greater, on_greater); } - -void RegExpMacroAssemblerIA32::CheckAtStart(Label* on_at_start) { - __ lea(eax, Operand(edi, -char_size())); +void RegExpMacroAssemblerIA32::CheckAtStart(int cp_offset, Label* on_at_start) { + __ lea(eax, Operand(edi, -char_size() + cp_offset * char_size())); __ cmp(eax, Operand(ebp, kStringStartMinusOne)); BranchOrBacktrack(equal, on_at_start); } - void RegExpMacroAssemblerIA32::CheckNotAtStart(int cp_offset, Label* on_not_at_start) { __ lea(eax, Operand(edi, -char_size() + cp_offset * char_size())); @@ -684,7 +686,7 @@ Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { Label stack_ok; ExternalReference stack_limit = - ExternalReference::address_of_stack_limit(isolate()); + ExternalReference::address_of_jslimit(isolate()); __ mov(ecx, esp); __ sub(ecx, StaticVariable(stack_limit)); // Handle it if the stack pointer is already below the stack limit. @@ -971,15 +973,19 @@ RegExpMacroAssembler::IrregexpImplementation return kIA32Implementation; } +void RegExpMacroAssemblerIA32::LoadCurrentCharacterImpl(int cp_offset, + Label* on_end_of_input, + bool check_bounds, + int characters, + int eats_at_least) { + // It's possible to preload a small number of characters when each success + // path requires a large number of characters, but not the reverse. + DCHECK_GE(eats_at_least, characters); -void RegExpMacroAssemblerIA32::LoadCurrentCharacter(int cp_offset, - Label* on_end_of_input, - bool check_bounds, - int characters) { DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works) if (check_bounds) { if (cp_offset >= 0) { - CheckPosition(cp_offset + characters - 1, on_end_of_input); + CheckPosition(cp_offset + eats_at_least - 1, on_end_of_input); } else { CheckPosition(cp_offset, on_end_of_input); } @@ -987,7 +993,6 @@ void RegExpMacroAssemblerIA32::LoadCurrentCharacter(int cp_offset, LoadCurrentCharacterUnchecked(cp_offset, characters); } - void RegExpMacroAssemblerIA32::PopCurrentPosition() { Pop(edi); } @@ -1120,7 +1125,8 @@ int RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address, return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry<Isolate*>(re_frame, kIsolate), frame_entry<int>(re_frame, kStartIndex), - frame_entry<int>(re_frame, kDirectCall) == 1, return_address, re_code, + static_cast<RegExp::CallOrigin>(frame_entry<int>(re_frame, kDirectCall)), + return_address, re_code, frame_entry_address<Address>(re_frame, kInputString), frame_entry_address<const byte*>(re_frame, kInputStart), frame_entry_address<const byte*>(re_frame, kInputEnd)); @@ -1214,7 +1220,7 @@ void RegExpMacroAssemblerIA32::CheckPreemption() { // Check for preemption. Label no_preempt; ExternalReference stack_limit = - ExternalReference::address_of_stack_limit(isolate()); + ExternalReference::address_of_jslimit(isolate()); __ cmp(esp, StaticVariable(stack_limit)); __ j(above, &no_preempt); @@ -1227,7 +1233,7 @@ void RegExpMacroAssemblerIA32::CheckPreemption() { void RegExpMacroAssemblerIA32::CheckStackLimit() { Label no_stack_overflow; ExternalReference stack_limit = - ExternalReference::address_of_regexp_stack_limit(isolate()); + ExternalReference::address_of_regexp_stack_limit_address(isolate()); __ cmp(backtrack_stackpointer(), StaticVariable(stack_limit)); __ j(above, &no_stack_overflow); |