Changeset 179912 in webkit
- Timestamp:
- Feb 10, 2015, 6:41:20 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 added
- 7 edited
-
CMakeLists.txt (modified) (1 diff)
-
ChangeLog (modified) (1 diff)
-
JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (modified) (2 diffs)
-
JavaScriptCore.xcodeproj/project.pbxproj (modified) (5 diffs)
-
bytecode/CallLinkInfo.h (modified) (2 diffs)
-
ftl/FTLJSCall.cpp (modified) (2 diffs)
-
ftl/FTLJSCall.h (modified) (4 diffs)
-
ftl/FTLJSCallBase.cpp (added)
-
ftl/FTLJSCallBase.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r179862 r179912 844 844 ftl/FTLJITFinalizer.cpp 845 845 ftl/FTLJSCall.cpp 846 ftl/FTLJSCallBase.cpp 846 847 ftl/FTLLink.cpp 847 848 ftl/FTLLocation.cpp -
trunk/Source/JavaScriptCore/ChangeLog
r179898 r179912 1 2015-02-10 Filip Pizlo <fpizlo@apple.com> 2 3 Split FTL::JSCall into the part that knows about call inline caching and the part that interacts with LLVM patchpoints 4 https://bugs.webkit.org/show_bug.cgi?id=141455 5 6 Reviewed by Mark Lam. 7 8 The newly introduced FTL::JSCallBase can be used to build other things, like the FTL portion 9 of https://bugs.webkit.org/show_bug.cgi?id=141332. 10 11 * CMakeLists.txt: 12 * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: 13 * JavaScriptCore.xcodeproj/project.pbxproj: 14 * bytecode/CallLinkInfo.h: 15 (JSC::CallLinkInfo::specializationKindFor): 16 (JSC::CallLinkInfo::specializationKind): 17 * ftl/FTLJSCall.cpp: 18 (JSC::FTL::JSCall::JSCall): 19 (JSC::FTL::JSCall::emit): Deleted. 20 (JSC::FTL::JSCall::link): Deleted. 21 * ftl/FTLJSCall.h: 22 * ftl/FTLJSCallBase.cpp: Added. 23 (JSC::FTL::JSCallBase::JSCallBase): 24 (JSC::FTL::JSCallBase::emit): 25 (JSC::FTL::JSCallBase::link): 26 * ftl/FTLJSCallBase.h: Added. 27 1 28 2015-02-10 Filip Pizlo <fpizlo@apple.com> 2 29 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r179862 r179912 511 511 <ClCompile Include="..\ftl\FTLJITFinalizer.cpp" /> 512 512 <ClCompile Include="..\ftl\FTLJSCall.cpp" /> 513 <ClCompile Include="..\ftl\FTLJSCallBase.cpp" /> 513 514 <ClCompile Include="..\ftl\FTLLink.cpp" /> 514 515 <ClCompile Include="..\ftl\FTLLocation.cpp" /> … … 1192 1193 <ClInclude Include="..\ftl\FTLJITFinalizer.h" /> 1193 1194 <ClInclude Include="..\ftl\FTLJSCall.h" /> 1195 <ClInclude Include="..\ftl\FTLJSCallBase.h" /> 1194 1196 <ClInclude Include="..\ftl\FTLLink.h" /> 1195 1197 <ClInclude Include="..\ftl\FTLLocation.h" /> -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r179862 r179912 563 563 0FCEFADF180738C000472CE4 /* FTLLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFADD180738C000472CE4 /* FTLLocation.cpp */; }; 564 564 0FCEFAE0180738C000472CE4 /* FTLLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFADE180738C000472CE4 /* FTLLocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 565 0FD1202F1A8AED12000F5280 /* FTLJSCallBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD1202D1A8AED12000F5280 /* FTLJSCallBase.cpp */; }; 566 0FD120301A8AED12000F5280 /* FTLJSCallBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD1202E1A8AED12000F5280 /* FTLJSCallBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 565 567 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 566 568 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */; }; … … 2244 2246 0FCEFADD180738C000472CE4 /* FTLLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLLocation.cpp; path = ftl/FTLLocation.cpp; sourceTree = "<group>"; }; 2245 2247 0FCEFADE180738C000472CE4 /* FTLLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLLocation.h; path = ftl/FTLLocation.h; sourceTree = "<group>"; }; 2248 0FD1202D1A8AED12000F5280 /* FTLJSCallBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLJSCallBase.cpp; path = ftl/FTLJSCallBase.cpp; sourceTree = "<group>"; }; 2249 0FD1202E1A8AED12000F5280 /* FTLJSCallBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLJSCallBase.h; path = ftl/FTLJSCallBase.h; sourceTree = "<group>"; }; 2246 2250 0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; }; 2247 2251 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; }; … … 3601 3605 0F6B1CB3185FC9E900845D97 /* FTLJSCall.cpp */, 3602 3606 0F6B1CB4185FC9E900845D97 /* FTLJSCall.h */, 3607 0FD1202D1A8AED12000F5280 /* FTLJSCallBase.cpp */, 3608 0FD1202E1A8AED12000F5280 /* FTLJSCallBase.h */, 3603 3609 0F8F2B93172E049E007DBDA5 /* FTLLink.cpp */, 3604 3610 0F8F2B94172E049E007DBDA5 /* FTLLink.h */, … … 6130 6136 2AAD964A18569417001F93BE /* RecursiveAllocationScope.h in Headers */, 6131 6137 0FF60AC216740F8300029779 /* ReduceWhitespace.h in Headers */, 6138 0FD120301A8AED12000F5280 /* FTLJSCallBase.h in Headers */, 6132 6139 0FA7A8EC18B413C80052371D /* Reg.h in Headers */, 6133 6140 BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */, … … 7258 7265 A54CF2F5184EAB2400237F19 /* ScriptValue.cpp in Sources */, 7259 7266 A7299DA517D12858005F5FF9 /* SetConstructor.cpp in Sources */, 7267 0FD1202F1A8AED12000F5280 /* FTLJSCallBase.cpp in Sources */, 7260 7268 A790DD6B182F499700588807 /* SetIteratorConstructor.cpp in Sources */, 7261 7269 A790DD6D182F499700588807 /* SetIteratorPrototype.cpp in Sources */, -
trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.h
r179478 r179912 56 56 return CallVarargs; 57 57 } 58 58 59 59 CallLinkInfo() 60 60 : isFTL(false) … … 72 72 } 73 73 74 static CodeSpecializationKind specializationKindFor(CallType callType) 75 { 76 return specializationFromIsConstruct(callType == Construct || callType == ConstructVarargs); 77 } 74 78 CodeSpecializationKind specializationKind() const 75 79 { 76 return specialization FromIsConstruct(callType == Construct || callType == ConstructVarargs);80 return specializationKindFor(static_cast<CallType>(callType)); 77 81 } 78 82 -
trunk/Source/JavaScriptCore/ftl/FTLJSCall.cpp
r178856 r179912 1 1 /* 2 * Copyright (C) 2013 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 namespace JSC { namespace FTL { 35 35 36 using namespace DFG; 37 36 38 JSCall::JSCall() 37 39 : m_stackmapID(UINT_MAX) 38 , m_node(nullptr)39 , m_callLinkInfo(nullptr)40 40 , m_instructionOffset(UINT_MAX) 41 41 { 42 42 } 43 43 44 JSCall::JSCall(unsigned stackmapID, DFG::Node* node) 45 : m_stackmapID(stackmapID) 46 , m_node(node) 47 , m_callLinkInfo(nullptr) 44 JSCall::JSCall(unsigned stackmapID, Node* node) 45 : JSCallBase( 46 node->op() == Construct ? CallLinkInfo::Construct : CallLinkInfo::Call, 47 node->origin.semantic) 48 , m_stackmapID(stackmapID) 48 49 , m_instructionOffset(0) 49 50 { 50 }51 52 void JSCall::emit(CCallHelpers& jit)53 {54 m_callLinkInfo = jit.codeBlock()->addCallLinkInfo();55 56 CCallHelpers::Jump slowPath = jit.branchPtrWithPatch(57 CCallHelpers::NotEqual, GPRInfo::regT0, m_targetToCheck,58 CCallHelpers::TrustedImmPtr(0));59 60 m_fastCall = jit.nearCall();61 CCallHelpers::Jump done = jit.jump();62 63 slowPath.link(&jit);64 65 jit.move(CCallHelpers::TrustedImmPtr(m_callLinkInfo), GPRInfo::regT2);66 m_slowCall = jit.nearCall();67 68 done.link(&jit);69 }70 71 void JSCall::link(VM& vm, LinkBuffer& linkBuffer)72 {73 ThunkGenerator generator = linkThunkGeneratorFor(74 m_node->op() == DFG::Construct ? CodeForConstruct : CodeForCall,75 MustPreserveRegisters);76 77 linkBuffer.link(78 m_slowCall, FunctionPtr(vm.getCTIStub(generator).code().executableAddress()));79 80 m_callLinkInfo->isFTL = true;81 m_callLinkInfo->callType = m_node->op() == DFG::Construct ? CallLinkInfo::Construct : CallLinkInfo::Call;82 m_callLinkInfo->codeOrigin = m_node->origin.semantic;83 m_callLinkInfo->callReturnLocation = linkBuffer.locationOfNearCall(m_slowCall);84 m_callLinkInfo->hotPathBegin = linkBuffer.locationOf(m_targetToCheck);85 m_callLinkInfo->hotPathOther = linkBuffer.locationOfNearCall(m_fastCall);86 m_callLinkInfo->calleeGPR = GPRInfo::regT0;87 51 } 88 52 -
trunk/Source/JavaScriptCore/ftl/FTLJSCall.h
r170876 r179912 1 1 /* 2 * Copyright (C) 2013 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 #if ENABLE(FTL_JIT) 30 30 31 #include "CCallHelpers.h" 32 #include "CallLinkInfo.h" 33 #include "CodeOrigin.h" 31 #include "FTLJSCallBase.h" 34 32 35 33 namespace JSC { 36 37 class LinkBuffer;38 34 39 35 namespace DFG { … … 43 39 namespace FTL { 44 40 45 class JSCall {41 class JSCall : public JSCallBase { 46 42 public: 47 43 JSCall(); 48 44 JSCall(unsigned stackmapID, DFG::Node*); 49 50 void emit(CCallHelpers&);51 void link(VM&, LinkBuffer&);52 45 53 46 unsigned stackmapID() const { return m_stackmapID; } … … 60 53 private: 61 54 unsigned m_stackmapID; 62 DFG::Node* m_node;63 CCallHelpers::DataLabelPtr m_targetToCheck;64 CCallHelpers::Call m_fastCall;65 CCallHelpers::Call m_slowCall;66 CallLinkInfo* m_callLinkInfo;67 55 68 56 public:
Note:
See TracChangeset
for help on using the changeset viewer.