Title: [260333] trunk/Source/_javascript_Core
Revision
260333
Author
[email protected]
Date
2020-04-18 20:43:47 -0700 (Sat, 18 Apr 2020)

Log Message

Fix CLoop build for iterator opcodes
https://bugs.webkit.org/show_bug.cgi?id=210709

Reviewed by Robin Morisset.

We need to add a default paramater for the metadata pointer
in the CLoop build. Additionally, the helper declarations need
to be in the various slow path header files. Lastly we need
opcode labels for our new JS call return points.

* bytecode/BytecodeList.rb:
* llint/LLIntSlowPaths.cpp:
* llint/LLIntSlowPaths.h:
* runtime/CommonSlowPaths.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (260332 => 260333)


--- trunk/Source/_javascript_Core/ChangeLog	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-04-19 03:43:47 UTC (rev 260333)
@@ -1,3 +1,20 @@
+2020-04-18  Keith Miller  <[email protected]>
+
+        Fix CLoop build for iterator opcodes
+        https://bugs.webkit.org/show_bug.cgi?id=210709
+
+        Reviewed by Robin Morisset.
+
+        We need to add a default paramater for the metadata pointer
+        in the CLoop build. Additionally, the helper declarations need
+        to be in the various slow path header files. Lastly we need
+        opcode labels for our new JS call return points.
+
+        * bytecode/BytecodeList.rb:
+        * llint/LLIntSlowPaths.cpp:
+        * llint/LLIntSlowPaths.h:
+        * runtime/CommonSlowPaths.h:
+
 2020-04-18  Robin Morisset  <[email protected]>
 
         Support an inlined representation in JSValue of small BigInts ("BigInt32")

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeList.rb (260332 => 260333)


--- trunk/Source/_javascript_Core/bytecode/BytecodeList.rb	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeList.rb	2020-04-19 03:43:47 UTC (rev 260333)
@@ -1313,6 +1313,18 @@
 op :llint_cloop_did_return_from_js_32
 op :llint_cloop_did_return_from_js_33
 op :llint_cloop_did_return_from_js_34
+op :llint_cloop_did_return_from_js_35
+op :llint_cloop_did_return_from_js_36
+op :llint_cloop_did_return_from_js_37
+op :llint_cloop_did_return_from_js_38
+op :llint_cloop_did_return_from_js_39
+op :llint_cloop_did_return_from_js_40
+op :llint_cloop_did_return_from_js_41
+op :llint_cloop_did_return_from_js_42
+op :llint_cloop_did_return_from_js_43
+op :llint_cloop_did_return_from_js_44
+op :llint_cloop_did_return_from_js_45
+op :llint_cloop_did_return_from_js_46
 
 end_section :CLoopHelpers
 

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (260332 => 260333)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2020-04-19 03:43:47 UTC (rev 260333)
@@ -836,7 +836,6 @@
     LLINT_RETURN_PROFILED(result);
 }
 
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_open_get_next);
 LLINT_SLOW_PATH_DECL(slow_path_iterator_open_get_next)
 {
     LLINT_BEGIN();
@@ -853,7 +852,6 @@
     LLINT_END();
 }
 
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_get_done);
 LLINT_SLOW_PATH_DECL(slow_path_iterator_next_get_done)
 {
     LLINT_BEGIN();
@@ -874,7 +872,6 @@
     LLINT_END();
 }
 
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_get_value);
 LLINT_SLOW_PATH_DECL(slow_path_iterator_next_get_value)
 {
     LLINT_BEGIN();
@@ -892,7 +889,6 @@
     LLINT_END();
 }
 
-
 LLINT_SLOW_PATH_DECL(slow_path_put_by_id)
 {
     LLINT_BEGIN();
@@ -1669,7 +1665,6 @@
     RELEASE_AND_RETURN(throwScope, genericCall(codeBlock, callFrame, pc->as<OpConstruct>(), CodeForConstruct));
 }
 
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_open_call);
 LLINT_SLOW_PATH_DECL(slow_path_iterator_open_call)
 {
     LLINT_BEGIN();
@@ -1678,7 +1673,6 @@
     RELEASE_AND_RETURN(throwScope, genericCall(codeBlock, callFrame, pc->as<OpIteratorOpen>(), CodeForCall, OpIteratorOpen::symbolCall));
 }
 
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_call);
 LLINT_SLOW_PATH_DECL(slow_path_iterator_next_call)
 {
     LLINT_BEGIN();

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h (260332 => 260333)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h	2020-04-19 03:43:47 UTC (rev 260333)
@@ -81,6 +81,9 @@
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_setter_by_id);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_by_val);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_setter_by_val);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_open_get_next);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_get_done);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_get_value);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jtrue);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jfalse);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jless);
@@ -119,6 +122,8 @@
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval_wide16);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval_wide32);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_open_call);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_iterator_next_call);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_arguments);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive);

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (260332 => 260333)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2020-04-19 03:43:47 UTC (rev 260333)
@@ -2604,11 +2604,22 @@
 llintOp(op_iterator_open, OpIteratorOpen, macro (size, get, dispatch)
     defineOSRExitReturnLabel(op_iterator_open, size)
     break
+    if C_LOOP or C_LOOP_WIN
+        # Insert superflous call return labels for Cloop.
+        cloopCallJSFunction a0 # symbolIterator
+        cloopCallJSFunction a0 # get next
+    end
 end)
 
 llintOp(op_iterator_next, OpIteratorNext, macro (size, get, dispatch)
     defineOSRExitReturnLabel(op_iterator_next, size)
     break
+    if C_LOOP or C_LOOP_WIN
+        # Insert superflous call return labels for Cloop.
+        # FIXME: Not sure why two are only needed...
+        cloopCallJSFunction a0 # next
+        cloopCallJSFunction a0 # get done
+    end
 end)
 
 llintOpWithProfile(op_get_internal_field, OpGetInternalField, macro (size, get, dispatch, return)

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (260332 => 260333)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2020-04-19 03:07:05 UTC (rev 260332)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2020-04-19 03:43:47 UTC (rev 260333)
@@ -285,15 +285,15 @@
 
 template<OpcodeSize size>
 extern SlowPathReturnType SLOW_PATH iterator_open_try_fast(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_narrow(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_wide16(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_wide32(CallFrame*, const Instruction* pc, void* metadata);
+extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_narrow(CallFrame*, const Instruction* pc, void* metadata = nullptr);
+extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_wide16(CallFrame*, const Instruction* pc, void* metadata = nullptr);
+extern "C" SlowPathReturnType SLOW_PATH iterator_open_try_fast_wide32(CallFrame*, const Instruction* pc, void* metadata = nullptr);
 
 template<OpcodeSize size>
 extern SlowPathReturnType SLOW_PATH iterator_next_try_fast(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_narrow(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_wide16(CallFrame*, const Instruction* pc, void* metadata);
-extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_wide32(CallFrame*, const Instruction* pc, void* metadata);
+extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_narrow(CallFrame*, const Instruction* pc, void* metadata = nullptr);
+extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_wide16(CallFrame*, const Instruction* pc, void* metadata = nullptr);
+extern "C" SlowPathReturnType SLOW_PATH iterator_next_try_fast_wide32(CallFrame*, const Instruction* pc, void* metadata = nullptr);
 
 using SlowPathFunction = SlowPathReturnType(SLOW_PATH *)(CallFrame*, const Instruction*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to