Title: [230397] releases/WebKitGTK/webkit-2.20/Source/_javascript_Core
Revision
230397
Author
carlo...@webkit.org
Date
2018-04-09 03:52:49 -0700 (Mon, 09 Apr 2018)

Log Message

Merge r229302 - JITThunk functions should only be called when the JIT is enabled.
https://bugs.webkit.org/show_bug.cgi?id=183351
<rdar://problem/38160091>

Reviewed by Keith Miller.

* jit/JITThunks.cpp:
(JSC::JITThunks::ctiNativeCall):
(JSC::JITThunks::ctiNativeConstruct):
(JSC::JITThunks::ctiInternalFunctionCall):
(JSC::JITThunks::ctiInternalFunctionConstruct):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::getCTIInternalFunctionTrampolineFor):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog (230396 => 230397)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-04-09 10:52:43 UTC (rev 230396)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-04-09 10:52:49 UTC (rev 230397)
@@ -1,3 +1,20 @@
+2018-03-05  Mark Lam  <mark....@apple.com>
+
+        JITThunk functions should only be called when the JIT is enabled.
+        https://bugs.webkit.org/show_bug.cgi?id=183351
+        <rdar://problem/38160091>
+
+        Reviewed by Keith Miller.
+
+        * jit/JITThunks.cpp:
+        (JSC::JITThunks::ctiNativeCall):
+        (JSC::JITThunks::ctiNativeConstruct):
+        (JSC::JITThunks::ctiInternalFunctionCall):
+        (JSC::JITThunks::ctiInternalFunctionConstruct):
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        (JSC::VM::getCTIInternalFunctionTrampolineFor):
+
 2018-03-01  Yusuke Suzuki  <utatane....@gmail.com>
 
         ASSERTION FAILED: matchContextualKeyword(m_vm->propertyNames->async)

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JITThunks.cpp (230396 => 230397)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JITThunks.cpp	2018-04-09 10:52:43 UTC (rev 230396)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JITThunks.cpp	2018-04-09 10:52:49 UTC (rev 230397)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013, 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,15 +47,13 @@
 
 MacroAssemblerCodePtr JITThunks::ctiNativeCall(VM* vm)
 {
-    if (!VM::canUseJIT())
-        return MacroAssemblerCodePtr::createLLIntCodePtr(llint_native_call_trampoline);
+    ASSERT(VM::canUseJIT());
     return ctiStub(vm, nativeCallGenerator).code();
 }
 
 MacroAssemblerCodePtr JITThunks::ctiNativeConstruct(VM* vm)
 {
-    if (!VM::canUseJIT())
-        return MacroAssemblerCodePtr::createLLIntCodePtr(llint_native_construct_trampoline);
+    ASSERT(VM::canUseJIT());
     return ctiStub(vm, nativeConstructGenerator).code();
 }
 
@@ -73,15 +71,13 @@
 
 MacroAssemblerCodePtr JITThunks::ctiInternalFunctionCall(VM* vm)
 {
-    if (!VM::canUseJIT())
-        return MacroAssemblerCodePtr::createLLIntCodePtr(llint_internal_function_call_trampoline);
+    ASSERT(VM::canUseJIT());
     return ctiStub(vm, internalFunctionCallGenerator).code();
 }
 
 MacroAssemblerCodePtr JITThunks::ctiInternalFunctionConstruct(VM* vm)
 {
-    if (!VM::canUseJIT())
-        return MacroAssemblerCodePtr::createLLIntCodePtr(llint_internal_function_construct_trampoline);
+    ASSERT(VM::canUseJIT());
     return ctiStub(vm, internalFunctionConstructGenerator).code();
 }
 

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.cpp (230396 => 230397)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.cpp	2018-04-09 10:52:43 UTC (rev 230396)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.cpp	2018-04-09 10:52:49 UTC (rev 230397)
@@ -454,9 +454,13 @@
         watchdog.setTimeLimit(Seconds::fromMilliseconds(Options::watchdog()));
     }
 
+#if ENABLE(JIT)
     // Make sure that any stubs that the JIT is going to use are initialized in non-compilation threads.
-    getCTIInternalFunctionTrampolineFor(CodeForCall);
-    getCTIInternalFunctionTrampolineFor(CodeForConstruct);
+    if (canUseJIT()) {
+        getCTIInternalFunctionTrampolineFor(CodeForCall);
+        getCTIInternalFunctionTrampolineFor(CodeForConstruct);
+    }
+#endif
 
     VMInspector::instance().add(this);
 }
@@ -698,14 +702,15 @@
 MacroAssemblerCodePtr VM::getCTIInternalFunctionTrampolineFor(CodeSpecializationKind kind)
 {
 #if ENABLE(JIT)
+    if (canUseJIT()) {
+        if (kind == CodeForCall)
+            return jitStubs->ctiInternalFunctionCall(this);
+        return jitStubs->ctiInternalFunctionConstruct(this);
+    }
+#endif
     if (kind == CodeForCall)
-        return jitStubs->ctiInternalFunctionCall(this);
-    return jitStubs->ctiInternalFunctionConstruct(this);
-#else
-    if (kind == CodeForCall)
         return MacroAssemblerCodePtr::createLLIntCodePtr(llint_internal_function_call_trampoline);
     return MacroAssemblerCodePtr::createLLIntCodePtr(llint_internal_function_construct_trampoline);
-#endif
 }
 
 VM::ClientData::~ClientData()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to