Changeset 138763 in webkit
- Timestamp:
- Jan 3, 2013, 4:28:23 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r138741 r138763 1 2013-01-03 Filip Pizlo <fpizlo@apple.com> 2 3 DFG::ByteCodeCache serves little or no purpose ever since we decided to keep bytecode around permanently 4 https://bugs.webkit.org/show_bug.cgi?id=106058 5 6 Reviewed by Michael Saboff. 7 8 All baseline code blocks now always have bytecode, so the bytecode cache's ability to minimize the 9 number of times that the DFG produces bytecode sequences for code blocks is superfluous. 10 11 * GNUmakefile.list.am: 12 * JavaScriptCore.xcodeproj/project.pbxproj: 13 * dfg/DFGByteCodeCache.h: Removed. 14 * dfg/DFGByteCodeParser.cpp: 15 (ByteCodeParser): 16 (JSC::DFG::ByteCodeParser::handleInlining): 17 * runtime/Executable.cpp: 18 (JSC): 19 * runtime/Executable.h: 20 (FunctionExecutable): 21 1 22 2013-01-03 Filip Pizlo <fpizlo@apple.com> 2 23 -
trunk/Source/JavaScriptCore/GNUmakefile.list.am
r138465 r138763 178 178 Source/JavaScriptCore/dfg/DFGBasicBlock.h \ 179 179 Source/JavaScriptCore/dfg/DFGBranchDirection.h \ 180 Source/JavaScriptCore/dfg/DFGByteCodeCache.h \181 180 Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp \ 182 181 Source/JavaScriptCore/dfg/DFGByteCodeParser.h \ -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r138604 r138763 173 173 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7B294814C3CD23007C3DB1 /* DFGCCallHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; }; 174 174 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; }; 175 0F7B294C14C3CD43007C3DB1 /* DFGByteCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };176 175 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0977E1469EBC400CF2442 /* DFGCommon.h */; settings = {ATTRIBUTES = (Private, ); }; }; 177 176 0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8023E91613832300A0BA45 /* ByValInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1000 999 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = "<group>"; }; 1001 1000 0F5EF91C16878F78003E5C25 /* JITThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITThunks.h; sourceTree = "<group>"; }; 1002 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeCache.h; path = dfg/DFGByteCodeCache.h; sourceTree = "<group>"; };1003 1001 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnconditionalFinalizer.h; sourceTree = "<group>"; }; 1004 1002 0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractState.cpp; path = dfg/DFGAbstractState.cpp; sourceTree = "<group>"; }; … … 2544 2542 0F620170143FCD2F0068B77C /* DFGBasicBlock.h */, 2545 2543 0F8364B5164B0C0E0053329A /* DFGBranchDirection.h */, 2546 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */,2547 2544 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */, 2548 2545 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */, … … 3131 3128 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */, 3132 3129 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */, 3133 0F7B294C14C3CD43007C3DB1 /* DFGByteCodeCache.h in Headers */,3134 3130 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */, 3135 3131 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r138737 r138763 33 33 #include "CodeBlock.h" 34 34 #include "DFGArrayMode.h" 35 #include "DFGByteCodeCache.h"36 35 #include "DFGCapabilities.h" 37 36 #include "GetByIdStatus.h" … … 1264 1263 unsigned m_emptyJSValueIndex; 1265 1264 1266 // Cache of code blocks that we've generated bytecode for.1267 ByteCodeCache<canInlineFunctionFor> m_codeBlockCache;1268 1269 1265 Instruction* m_currentInstruction; 1270 1266 }; … … 1398 1394 } 1399 1395 1400 // Does the code block's size match the heuristics/requirements for being 1401 // an inline candidate? 1402 CodeBlock* profiledBlock = executable->profiledCodeBlockFor(kind); 1403 if (!profiledBlock) 1404 return false; 1405 1406 if (!mightInlineFunctionFor(profiledBlock, kind)) 1407 return false; 1408 1409 // If we get here then it looks like we should definitely inline this code. Proceed 1410 // with parsing the code to get bytecode, so that we can then parse the bytecode. 1411 // Note that if LLInt is enabled, the bytecode will always be available. Also note 1412 // that if LLInt is enabled, we may inline a code block that has never been JITted 1413 // before! 1414 CodeBlock* codeBlock = m_codeBlockCache.get(CodeBlockKey(executable, kind), expectedFunction->scope()); 1396 // Do we have a code block, and does the code block's size match the heuristics/requirements for 1397 // being an inline candidate? We might not have a code block if code was thrown away or if we 1398 // simply hadn't actually made this call yet. We could still theoretically attempt to inline it 1399 // if we had a static proof of what was being called; this might happen for example if you call a 1400 // global function, where watchpointing gives us static information. Overall, it's a rare case 1401 // because we expect that any hot callees would have already been compiled. 1402 CodeBlock* codeBlock = executable->baselineCodeBlockFor(kind); 1415 1403 if (!codeBlock) 1416 1404 return false; 1417 1418 ASSERT(canInlineFunctionFor(codeBlock, kind));1419 1405 if (!canInlineFunctionFor(codeBlock, kind)) 1406 return false; 1407 1420 1408 #if DFG_ENABLE(DEBUG_VERBOSE) 1421 1409 dataLogF("Inlining executable %p.\n", executable); … … 1447 1435 1448 1436 InlineStackEntry inlineStackEntry( 1449 this, codeBlock, profiledBlock, m_graph.m_blocks.size() - 1,1437 this, codeBlock, codeBlock, m_graph.m_blocks.size() - 1, 1450 1438 expectedFunction, (VirtualRegister)m_inlineStackTop->remapOperand( 1451 1439 usesResult ? resultOperand : InvalidVirtualRegister), -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r138741 r138763 488 488 #endif 489 489 490 FunctionCodeBlock* FunctionExecutable::codeBlockWithBytecodeFor(CodeSpecializationKind kind)491 {492 return baselineCodeBlockFor(kind);493 }494 495 490 PassOwnPtr<FunctionCodeBlock> FunctionExecutable::produceCodeBlockFor(JSScope* scope, CodeSpecializationKind specializationKind, JSObject*& exception) 496 491 { -
trunk/Source/JavaScriptCore/runtime/Executable.h
r138516 r138763 598 598 } 599 599 600 FunctionCodeBlock* codeBlockWithBytecodeFor(CodeSpecializationKind);601 602 600 PassOwnPtr<FunctionCodeBlock> produceCodeBlockFor(JSScope*, CodeSpecializationKind, JSObject*& exception); 603 601
Note:
See TracChangeset
for help on using the changeset viewer.