Commit ab033d04 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC/s390: [regexp] Always pass the isolate to CaseInsensitiveCompareUC16

Port d303f4fb

Original Commit Message:

    In the past we've used the isolate argument to signal whether we were
    in unicode mode (nullptr) or not (the real isolate). This is no longer
    needed, and in fact breaks no-i18n mode which always expects to have a
    real isolate.

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I2b8ede3c89738a6cec59f8e32657a3c8c815fe6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2081888Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66534}
parent 7ad6b04e
......@@ -242,7 +242,7 @@ void RegExpMacroAssemblerPPC::CheckGreedyLoop(Label* on_equal) {
}
void RegExpMacroAssemblerPPC::CheckNotBackReferenceIgnoreCase(
int start_reg, bool read_backward, bool unicode, Label* on_no_match) {
int start_reg, bool read_backward, Label* on_no_match) {
Label fallthrough;
__ LoadP(r3, register_location(start_reg), r0); // Index of start of capture
__ LoadP(r4, register_location(start_reg + 1), r0); // Index of end
......@@ -337,7 +337,7 @@ void RegExpMacroAssemblerPPC::CheckNotBackReferenceIgnoreCase(
// r3: Address byte_offset1 - Address captured substring's start.
// r4: Address byte_offset2 - Address of current character position.
// r5: size_t byte_length - length of capture in bytes(!)
// r6: Isolate* isolate or 0 if unicode flag.
// r6: Isolate* isolate.
// Address of start of capture.
__ add(r3, r3, end_of_input_address());
......@@ -351,14 +351,7 @@ void RegExpMacroAssemblerPPC::CheckNotBackReferenceIgnoreCase(
__ sub(r4, r4, r25);
}
// Isolate.
#ifdef V8_INTL_SUPPORT
if (unicode) {
__ li(r6, Operand::Zero());
} else // NOLINT
#endif // V8_INTL_SUPPORT
{
__ mov(r6, Operand(ExternalReference::isolate_address(isolate())));
}
__ mov(r6, Operand(ExternalReference::isolate_address(isolate())));
{
AllowExternalCallThatCantCauseGC scope(masm_);
......@@ -382,7 +375,6 @@ void RegExpMacroAssemblerPPC::CheckNotBackReferenceIgnoreCase(
__ bind(&fallthrough);
}
void RegExpMacroAssemblerPPC::CheckNotBackReference(int start_reg,
bool read_backward,
Label* on_no_match) {
......
......@@ -36,7 +36,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerPPC
virtual void CheckNotBackReference(int start_reg, bool read_backward,
Label* on_no_match);
virtual void CheckNotBackReferenceIgnoreCase(int start_reg,
bool read_backward, bool unicode,
bool read_backward,
Label* on_no_match);
virtual void CheckNotCharacter(unsigned c, Label* on_not_equal);
virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned mask,
......
......@@ -230,7 +230,7 @@ void RegExpMacroAssemblerS390::CheckGreedyLoop(Label* on_equal) {
}
void RegExpMacroAssemblerS390::CheckNotBackReferenceIgnoreCase(
int start_reg, bool read_backward, bool unicode, Label* on_no_match) {
int start_reg, bool read_backward, Label* on_no_match) {
Label fallthrough;
__ LoadP(r2, register_location(start_reg)); // Index of start of
// capture
......@@ -327,7 +327,7 @@ void RegExpMacroAssemblerS390::CheckNotBackReferenceIgnoreCase(
// r2: Address byte_offset1 - Address captured substring's start.
// r3: Address byte_offset2 - Address of current character position.
// r4: size_t byte_length - length of capture in bytes(!)
// r5: Isolate* isolate or 0 if unicode flag.
// r5: Isolate* isolate.
// Address of start of capture.
__ AddP(r2, end_of_input_address());
......@@ -341,14 +341,7 @@ void RegExpMacroAssemblerS390::CheckNotBackReferenceIgnoreCase(
__ SubP(r3, r3, r6);
}
// Isolate.
#ifdef V8_INTL_SUPPORT
if (unicode) {
__ LoadImmP(r5, Operand::Zero());
} else // NOLINT
#endif // V8_INTL_SUPPORT
{
__ mov(r5, Operand(ExternalReference::isolate_address(isolate())));
}
__ mov(r5, Operand(ExternalReference::isolate_address(isolate())));
{
AllowExternalCallThatCantCauseGC scope(masm_);
......
......@@ -36,7 +36,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerS390
virtual void CheckNotBackReference(int start_reg, bool read_backward,
Label* on_no_match);
virtual void CheckNotBackReferenceIgnoreCase(int start_reg,
bool read_backward, bool unicode,
bool read_backward,
Label* on_no_match);
virtual void CheckNotCharacter(unsigned c, Label* on_not_equal);
virtual void CheckNotCharacterAfterAnd(unsigned c, unsigned mask,
......
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