Title: [223891] trunk/Source/_javascript_Core
Revision
223891
Author
[email protected]
Date
2017-10-24 09:36:37 -0700 (Tue, 24 Oct 2017)

Log Message

[JSC] Drop ArityCheckData
https://bugs.webkit.org/show_bug.cgi?id=178648

Reviewed by Mark Lam.

ArityCheckData is used to return a pair of `slotsToAdd` and `thunkToCall`.
However, use of `thunkToCall` is removed in 64bit environment at r189575.

We remove `thunkToCall` and align 32bit implementation to 64bit implementation.
Since we no longer need to have the above pair, we can remove ArityCheckData too.

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
(JSC::setupArityCheckData): Deleted.
* runtime/CommonSlowPaths.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (223890 => 223891)


--- trunk/Source/_javascript_Core/ChangeLog	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-10-24 16:36:37 UTC (rev 223891)
@@ -1,3 +1,26 @@
+2017-10-22  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Drop ArityCheckData
+        https://bugs.webkit.org/show_bug.cgi?id=178648
+
+        Reviewed by Mark Lam.
+
+        ArityCheckData is used to return a pair of `slotsToAdd` and `thunkToCall`.
+        However, use of `thunkToCall` is removed in 64bit environment at r189575.
+
+        We remove `thunkToCall` and align 32bit implementation to 64bit implementation.
+        Since we no longer need to have the above pair, we can remove ArityCheckData too.
+
+        * llint/LowLevelInterpreter32_64.asm:
+        * llint/LowLevelInterpreter64.asm:
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        (JSC::setupArityCheckData): Deleted.
+        * runtime/CommonSlowPaths.h:
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        * runtime/VM.h:
+
 2017-10-23  Keith Miller  <[email protected]>
 
         Unreviewed, reland r223866

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (223890 => 223891)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2017-10-24 16:36:37 UTC (rev 223891)
@@ -579,20 +579,7 @@
     jmp _llint_throw_from_slow_path_trampoline
 
 .noError:
-    # r1 points to ArityCheckData.
-    loadp CommonSlowPaths::ArityCheckData::thunkToCall[r1], t3
-    btpz t3, .proceedInline
-    
-    loadp CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], a0
-    call t3
-    if ASSERT_ENABLED
-        loadp ReturnPC[cfr], t0
-        loadp [t0], t0
-    end
-    jmp .continue
-
-.proceedInline:
-    loadi CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], t1
+    move r1, t1 # r1 contains slotsToAdd.
     btiz t1, .continue
     loadi PayloadOffset + ArgumentCount[cfr], t2
     addi CallFrameHeaderSlots, t2

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (223890 => 223891)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2017-10-24 16:36:37 UTC (rev 223891)
@@ -514,7 +514,7 @@
     jmp _llint_throw_from_slow_path_trampoline
 
 .noError:
-    loadi CommonSlowPaths::ArityCheckData::paddedStackSpace[r1], t1
+    move r1, t1 # r1 contains slotsToAdd.
     btiz t1, .continue
     loadi PayloadOffset + ArgumentCount[cfr], t2
     addi CallFrameHeaderSlots, t2

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (223890 => 223891)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2017-10-24 16:36:37 UTC (rev 223891)
@@ -167,19 +167,6 @@
         CALL_END_IMPL(crExec, crCallTarget);                \
     } while (false)
 
-static CommonSlowPaths::ArityCheckData* setupArityCheckData(VM& vm, int slotsToAdd)
-{
-    CommonSlowPaths::ArityCheckData* result = vm.arityCheckData.get();
-    result->paddedStackSpace = slotsToAdd;
-#if ENABLE(JIT)
-    if (vm.canUseJIT())
-        result->thunkToCall = vm.getCTIStub(arityFixupGenerator).code().executableAddress();
-    else
-#endif
-        result->thunkToCall = 0;
-    return result;
-}
-
 SLOW_PATH_DECL(slow_path_call_arityCheck)
 {
     BEGIN();
@@ -192,7 +179,7 @@
         CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec));
         RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
     }
-    RETURN_TWO(0, setupArityCheckData(vm, slotsToAdd));
+    RETURN_TWO(0, bitwise_cast<void*>(static_cast<uintptr_t>(slotsToAdd)));
 }
 
 SLOW_PATH_DECL(slow_path_construct_arityCheck)
@@ -206,7 +193,7 @@
         CommonSlowPaths::interpreterThrowInCaller(exec, createStackOverflowError(exec));
         RETURN_TWO(bitwise_cast<void*>(static_cast<uintptr_t>(1)), exec);
     }
-    RETURN_TWO(0, setupArityCheckData(vm, slotsToAdd));
+    RETURN_TWO(0, bitwise_cast<void*>(static_cast<uintptr_t>(slotsToAdd)));
 }
 
 SLOW_PATH_DECL(slow_path_create_direct_arguments)

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (223890 => 223891)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2017-10-24 16:36:37 UTC (rev 223891)
@@ -45,11 +45,6 @@
 
 namespace CommonSlowPaths {
 
-struct ArityCheckData {
-    unsigned paddedStackSpace;
-    void* thunkToCall;
-};
-
 ALWAYS_INLINE int numberOfExtraSlots(int argumentCountIncludingThis)
 {
     int frameSize = argumentCountIncludingThis + CallFrame::headerSizeInRegisters;

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (223890 => 223891)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2017-10-24 16:36:37 UTC (rev 223891)
@@ -292,7 +292,6 @@
 #if ENABLE(JIT)
     jitStubs = std::make_unique<JITThunks>();
 #endif
-    arityCheckData = std::make_unique<CommonSlowPaths::ArityCheckData>();
 
 #if ENABLE(FTL_JIT)
     ftlThunks = std::make_unique<FTL::Thunks>();

Modified: trunk/Source/_javascript_Core/runtime/VM.h (223890 => 223891)


--- trunk/Source/_javascript_Core/runtime/VM.h	2017-10-24 16:33:16 UTC (rev 223890)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2017-10-24 16:36:37 UTC (rev 223891)
@@ -147,9 +147,6 @@
 class Thunks;
 }
 #endif // ENABLE(FTL_JIT)
-namespace CommonSlowPaths {
-struct ArityCheckData;
-}
 namespace Profiler {
 class Database;
 }
@@ -480,7 +477,6 @@
     }
 
 #endif // ENABLE(JIT)
-    std::unique_ptr<CommonSlowPaths::ArityCheckData> arityCheckData;
 #if ENABLE(FTL_JIT)
     std::unique_ptr<FTL::Thunks> ftlThunks;
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to