WebKit Bugzilla
Attachment 362006 Details for
Bug 194634
: [JSC] Should have default NativeJITCode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194634-20190214020214.patch (text/plain), 3.34 KB, created by
Yusuke Suzuki
on 2019-02-14 02:02:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2019-02-14 02:02:15 PST
Size:
3.34 KB
patch
obsolete
>Subversion Revision: 241500 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 203bf8e3805624a75507bc9f50d6a1cff3f31849..1239373ec44c2aa64881175fec914feb66ccc8fa 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-14 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Should have default NativeJITCode >+ https://bugs.webkit.org/show_bug.cgi?id=194634 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In JSC_useJIT=false mode, we always create identical NativeJITCode for call and construct when we create NativeExecutable. >+ This is meaningless since we do not modify NativeJITCode after the creation. This patch adds singleton used as a default one. >+ Since NativeJITCode (& JITCode) is ThreadSafeRefCounted, we can just share it in a whole process level. This removes 446 NativeJITCode >+ allocations, which takes 14KB. >+ >+ * runtime/VM.cpp: >+ (JSC::jitCodeForCallTrampoline): >+ (JSC::jitCodeForConstructTrampoline): >+ (JSC::VM::getHostFunction): >+ > 2019-02-13 Keith Miller <keith_miller@apple.com> and Yusuke Suzuki <ysuzuki@apple.com> > > We should only make rope strings when concatenating strings long enough. >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index a3091d09693f89c8355e4cde07d87c8cb3d3b9fe..8b133f6045bcf3edc76ee1c02cc4e78907cbd0e0 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -688,6 +688,26 @@ NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction co > return getHostFunction(function, NoIntrinsic, constructor, nullptr, name); > } > >+static Ref<NativeJITCode> jitCodeForCallTrampoline() >+{ >+ static NativeJITCode* result; >+ static std::once_flag onceKey; >+ std::call_once(onceKey, [&] { >+ result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk, NoIntrinsic); >+ }); >+ return makeRef(*result); >+} >+ >+static Ref<NativeJITCode> jitCodeForConstructTrampoline() >+{ >+ static NativeJITCode* result; >+ static std::once_flag onceKey; >+ std::call_once(onceKey, [&] { >+ result = new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_construct_trampoline), JITCode::HostCallThunk, NoIntrinsic); >+ }); >+ return makeRef(*result); >+} >+ > NativeExecutable* VM::getHostFunction(NativeFunction function, Intrinsic intrinsic, NativeFunction constructor, const DOMJIT::Signature* signature, const String& name) > { > #if ENABLE(JIT) >@@ -700,11 +720,7 @@ NativeExecutable* VM::getHostFunction(NativeFunction function, Intrinsic intrins > #endif // ENABLE(JIT) > UNUSED_PARAM(intrinsic); > UNUSED_PARAM(signature); >- >- return NativeExecutable::create(*this, >- adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_call_trampoline), JITCode::HostCallThunk, NoIntrinsic)), function, >- adoptRef(*new NativeJITCode(LLInt::getCodeRef<JSEntryPtrTag>(llint_native_construct_trampoline), JITCode::HostCallThunk, NoIntrinsic)), constructor, >- name); >+ return NativeExecutable::create(*this, jitCodeForCallTrampoline(), function, jitCodeForConstructTrampoline(), constructor, name); > } > > MacroAssemblerCodePtr<JSEntryPtrTag> VM::getCTIInternalFunctionTrampolineFor(CodeSpecializationKind kind)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mark.lam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194634
: 362006