diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-03-12 09:01:49 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-03-14 18:49:21 +0100 |
commit | 7b48713334469818661fe276cf571de9c7899f2d (patch) | |
tree | 4dbda49ac88db76ce09dc330a0cb587e68e139ba /deps/v8/src/regexp/mips | |
parent | 8549ac09b256666cf5275224ec58fab9939ff32e (diff) | |
download | node-new-7b48713334469818661fe276cf571de9c7899f2d.tar.gz |
deps: update V8 to 7.3.492.25
PR-URL: https://github.com/nodejs/node/pull/25852
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/regexp/mips')
-rw-r--r-- | deps/v8/src/regexp/mips/OWNERS | 5 | ||||
-rw-r--r-- | deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc | 52 | ||||
-rw-r--r-- | deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h | 6 |
3 files changed, 41 insertions, 22 deletions
diff --git a/deps/v8/src/regexp/mips/OWNERS b/deps/v8/src/regexp/mips/OWNERS index 8bbcab4c2d..b455d9ef29 100644 --- a/deps/v8/src/regexp/mips/OWNERS +++ b/deps/v8/src/regexp/mips/OWNERS @@ -1,2 +1,3 @@ -ibogosavljevic@wavecomp.com -skovacevic@wavecomp.com
\ No newline at end of file +arikalo@wavecomp.com +prudic@wavecomp.com +skovacevic@wavecomp.com diff --git a/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc b/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc index 36ac93275e..81f7aa73c8 100644 --- a/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc +++ b/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.cc @@ -7,12 +7,12 @@ #include "src/regexp/mips/regexp-macro-assembler-mips.h" #include "src/assembler-inl.h" -#include "src/code-stubs.h" #include "src/log.h" #include "src/macro-assembler.h" #include "src/objects-inl.h" #include "src/regexp/regexp-macro-assembler.h" #include "src/regexp/regexp-stack.h" +#include "src/snapshot/embedded-data.h" #include "src/unicode.h" namespace v8 { @@ -23,7 +23,7 @@ namespace internal { * This assembler uses the following register assignment convention * - t7 : Temporarily stores the index of capture start after a matching pass * for a global regexp. - * - t1 : Pointer to current code object (Code*) including heap object tag. + * - t1 : Pointer to current Code object including heap object tag. * - t2 : Current position in input, as negative offset from end of string. * Please notice that this is the byte offset, not the character offset! * - t3 : Currently loaded character. Must be loaded using @@ -75,7 +75,7 @@ namespace internal { * The data up to the return address must be placed there by the calling * code and the remaining arguments are passed in registers, e.g. by calling the * code entry as cast to a function with the signature: - * int (*match)(String* input_string, + * int (*match)(String input_string, * int start_index, * Address start, * Address end, @@ -90,12 +90,14 @@ namespace internal { #define __ ACCESS_MASM(masm_) +const int RegExpMacroAssemblerMIPS::kRegExpCodeSize; + RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode, int registers_to_save) : NativeRegExpMacroAssembler(isolate, zone), - masm_(new MacroAssembler(isolate, nullptr, kRegExpCodeSize, - CodeObjectRequired::kYes)), + masm_(new MacroAssembler(isolate, CodeObjectRequired::kYes, + NewAssemblerBuffer(kRegExpCodeSize))), mode_(mode), num_registers_(registers_to_save), num_saved_registers_(registers_to_save), @@ -115,7 +117,6 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, __ bind(&start_label_); // And then continue from here. } - RegExpMacroAssemblerMIPS::~RegExpMacroAssemblerMIPS() { delete masm_; // Unuse labels in case we throw away the assembler without calling GetCode. @@ -156,7 +157,7 @@ void RegExpMacroAssemblerMIPS::AdvanceRegister(int reg, int by) { void RegExpMacroAssemblerMIPS::Backtrack() { CheckPreemption(); - // Pop Code* offset from backtrack stack, add Code* and jump to location. + // Pop Code offset from backtrack stack, add Code and jump to location. Pop(a0); __ Addu(a0, a0, code_pointer()); __ Jump(a0); @@ -1087,6 +1088,9 @@ bool RegExpMacroAssemblerMIPS::CanReadUnaligned() { // Private methods: void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { + DCHECK(!isolate()->ShouldLoadConstantsFromRootList()); + DCHECK(!masm_->options().isolate_independent_code); + int stack_alignment = base::OS::ActivationFrameAlignment(); // Align the stack pointer and save the original sp value on the stack. @@ -1097,16 +1101,16 @@ void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { __ sw(scratch, MemOperand(sp)); __ mov(a2, frame_pointer()); - // Code* of self. + // Code of self. __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); // We need to make room for the return address on the stack. DCHECK(IsAligned(stack_alignment, kPointerSize)); __ Subu(sp, sp, Operand(stack_alignment)); - // Stack pointer now points to cell where return address is to be written. - // Arguments are in registers, meaning we teat the return address as - // argument 5. Since DirectCEntryStub will handleallocating space for the C + // The stack pointer now points to cell where the return address will be + // written. Arguments are in registers, meaning we treat the return address as + // argument 5. Since DirectCEntry will handle allocating space for the C // argument slots, we don't need to care about that here. This is how the // stack will look (sp meaning the value of sp at this moment): // [sp + 3] - empty slot if needed for alignment. @@ -1120,10 +1124,24 @@ void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { ExternalReference stack_guard_check = ExternalReference::re_check_stack_guard_state(masm_->isolate()); __ li(t9, Operand(stack_guard_check)); - DirectCEntryStub stub(isolate()); - stub.GenerateCall(masm_, t9); - // DirectCEntryStub allocated space for the C argument slots so we have to + if (FLAG_embedded_builtins) { + EmbeddedData d = EmbeddedData::FromBlob(); + CHECK(Builtins::IsIsolateIndependent(Builtins::kDirectCEntry)); + Address entry = d.InstructionStartOfBuiltin(Builtins::kDirectCEntry); + __ li(kScratchReg, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); + __ Call(kScratchReg); + } else { + // TODO(v8:8519): Remove this once embedded builtins are on unconditionally. + Handle<Code> code = BUILTIN_CODE(isolate(), DirectCEntry); + __ li(kScratchReg, + Operand(reinterpret_cast<intptr_t>(code.location()), + RelocInfo::CODE_TARGET), + CONSTANT_SIZE); + __ Call(kScratchReg); + } + + // DirectCEntry allocated space for the C argument slots so we have to // drop them with the return address from the stack with loading saved sp. // At this point stack must look: // [sp + 7] - empty slot if needed for alignment. @@ -1152,15 +1170,15 @@ static T* frame_entry_address(Address re_frame, int frame_offset) { return reinterpret_cast<T*>(re_frame + frame_offset); } - int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, - Code* re_code, + Address raw_code, Address re_frame) { + Code re_code = Code::cast(Object(raw_code)); 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, - frame_entry_address<String*>(re_frame, kInputString), + frame_entry_address<Address>(re_frame, kInputString), frame_entry_address<const byte*>(re_frame, kInputStart), frame_entry_address<const byte*>(re_frame, kInputEnd)); } diff --git a/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h b/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h index 6d61601a40..97cdef8b83 100644 --- a/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h +++ b/deps/v8/src/regexp/mips/regexp-macro-assembler-mips.h @@ -90,8 +90,8 @@ class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler { // Called from RegExp if the stack-guard is triggered. // If the code object is relocated, the return address is fixed before // returning. - static int CheckStackGuardState(Address* return_address, - Code* re_code, + // {raw_code} is an Address because this is called via ExternalReference. + static int CheckStackGuardState(Address* return_address, Address raw_code, Address re_frame); private: @@ -126,7 +126,7 @@ class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler { static const int kRegisterZero = kStringStartMinusOne - kPointerSize; // Initial size of code buffer. - static const size_t kRegExpCodeSize = 1024; + static const int kRegExpCodeSize = 1024; // Load a number of characters at the given offset from the // current position, into the current-character register. |