From 2afe87cdcbf07a3d3c4f8fba629e33df47fb7106 Mon Sep 17 00:00:00 2001 From: Milad Farazmand Date: Fri, 13 Sep 2019 15:49:57 -0400 Subject: [PATCH] PPC/s390: [regexp] Consolidate calls to jitted irregexp and regexp interpreter Port 213504b9d7ae34e8fe301af4a294508974f9f20f Original Commit Message: The code fields in a JSRegExp object now either contain irregexp compiled code or a trampoline to the interpreter. This way the code can be executed without explicitly checking if the regexp shall be interpreted or executed natively. In case of interpreted regexp the generated bytecode is now stored in its own fields instead of the code fields for Latin1 and UC16 respectively. The signatures of the jitted irregexp match and the regexp interpreter have been equalized. R=pthier@google.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com BUG= LOG=N Change-Id: Ia2a80ce927afa644441c0749add0fc35111eb720 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803657 Reviewed-by: Junliang Yan Commit-Queue: Milad Farazmand Cr-Commit-Position: refs/heads/master@{#63773} --- src/regexp/ppc/regexp-macro-assembler-ppc.cc | 8 ++++++-- src/regexp/s390/regexp-macro-assembler-s390.cc | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/regexp/ppc/regexp-macro-assembler-ppc.cc b/src/regexp/ppc/regexp-macro-assembler-ppc.cc index 13b5c85605..8babb204dd 100644 --- a/src/regexp/ppc/regexp-macro-assembler-ppc.cc +++ b/src/regexp/ppc/regexp-macro-assembler-ppc.cc @@ -37,7 +37,10 @@ namespace internal { * The remaining registers are free for computations. * Each call to a public method should retain this convention. * - * The stack will have the following structure: + * The stack will have the following structure + * - fp[44] Address regexp (address of the JSRegExp object; unused in + * native code, passed to match signature of + * the interpreter): * - fp[40] Isolate* isolate (address of the current isolate) * - fp[36] lr save area (currently unused) * - fp[32] backchain (currently unused) @@ -83,7 +86,8 @@ namespace internal { * int num_capture_registers, * byte* stack_area_base, * bool direct_call = false, - * Isolate* isolate); + * Isolate* isolate, + * Address regexp); * The call is performed by NativeRegExpMacroAssembler::Execute() * (in regexp-macro-assembler.cc) via the GeneratedCode wrapper. */ diff --git a/src/regexp/s390/regexp-macro-assembler-s390.cc b/src/regexp/s390/regexp-macro-assembler-s390.cc index d4144e7e64..8555ce45c2 100644 --- a/src/regexp/s390/regexp-macro-assembler-s390.cc +++ b/src/regexp/s390/regexp-macro-assembler-s390.cc @@ -38,7 +38,10 @@ namespace internal { * The remaining registers are free for computations. * Each call to a public method should retain this convention. * - * The stack will have the following structure: + * The stack will have the following structure + * - fp[112] Address regexp (address of the JSRegExp object; unused in + * native code, passed to match signature of + * the interpreter) * - fp[108] Isolate* isolate (address of the current isolate) * - fp[104] direct_call (if 1, direct call from JavaScript code, * if 0, call through the runtime system). @@ -85,7 +88,8 @@ namespace internal { * int num_capture_registers, * byte* stack_area_base, * bool direct_call = false, - * Isolate* isolate); + * Isolate* isolate, + * Address regexp); * The call is performed by NativeRegExpMacroAssembler::Execute() * (in regexp-macro-assembler.cc) via the GeneratedCode wrapper. */