Changeset 138763 in webkit


Ignore:
Timestamp:
Jan 3, 2013, 4:28:23 PM (13 years ago)
Author:
fpizlo@apple.com
Message:

DFG::ByteCodeCache serves little or no purpose ever since we decided to keep bytecode around permanently
https://bugs.webkit.org/show_bug.cgi?id=106058

Reviewed by Michael Saboff.

All baseline code blocks now always have bytecode, so the bytecode cache's ability to minimize the
number of times that the DFG produces bytecode sequences for code blocks is superfluous.

  • GNUmakefile.list.am:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGByteCodeCache.h: Removed.
  • dfg/DFGByteCodeParser.cpp:

(ByteCodeParser):
(JSC::DFG::ByteCodeParser::handleInlining):

  • runtime/Executable.cpp:

(JSC):

  • runtime/Executable.h:

(FunctionExecutable):

Location:
trunk/Source/JavaScriptCore
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r138741 r138763  
     12013-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
    1222013-01-03  Filip Pizlo  <fpizlo@apple.com>
    223
  • trunk/Source/JavaScriptCore/GNUmakefile.list.am

    r138465 r138763  
    178178        Source/JavaScriptCore/dfg/DFGBasicBlock.h \
    179179        Source/JavaScriptCore/dfg/DFGBranchDirection.h \
    180         Source/JavaScriptCore/dfg/DFGByteCodeCache.h \
    181180        Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp \
    182181        Source/JavaScriptCore/dfg/DFGByteCodeParser.h \
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r138604 r138763  
    173173                0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7B294814C3CD23007C3DB1 /* DFGCCallHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; };
    174174                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, ); }; };
    176175                0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0977E1469EBC400CF2442 /* DFGCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
    177176                0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8023E91613832300A0BA45 /* ByValInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1000999                0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = "<group>"; };
    10011000                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>"; };
    10031001                0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnconditionalFinalizer.h; sourceTree = "<group>"; };
    10041002                0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractState.cpp; path = dfg/DFGAbstractState.cpp; sourceTree = "<group>"; };
     
    25442542                                0F620170143FCD2F0068B77C /* DFGBasicBlock.h */,
    25452543                                0F8364B5164B0C0E0053329A /* DFGBranchDirection.h */,
    2546                                 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */,
    25472544                                86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */,
    25482545                                86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */,
     
    31313128                                0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */,
    31323129                                0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */,
    3133                                 0F7B294C14C3CD43007C3DB1 /* DFGByteCodeCache.h in Headers */,
    31343130                                0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */,
    31353131                                0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */,
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r138737 r138763  
    3333#include "CodeBlock.h"
    3434#include "DFGArrayMode.h"
    35 #include "DFGByteCodeCache.h"
    3635#include "DFGCapabilities.h"
    3736#include "GetByIdStatus.h"
     
    12641263    unsigned m_emptyJSValueIndex;
    12651264   
    1266     // Cache of code blocks that we've generated bytecode for.
    1267     ByteCodeCache<canInlineFunctionFor> m_codeBlockCache;
    1268    
    12691265    Instruction* m_currentInstruction;
    12701266};
     
    13981394    }
    13991395   
    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);
    14151403    if (!codeBlock)
    14161404        return false;
    1417    
    1418     ASSERT(canInlineFunctionFor(codeBlock, kind));
    1419 
     1405    if (!canInlineFunctionFor(codeBlock, kind))
     1406        return false;
     1407   
    14201408#if DFG_ENABLE(DEBUG_VERBOSE)
    14211409    dataLogF("Inlining executable %p.\n", executable);
     
    14471435
    14481436    InlineStackEntry inlineStackEntry(
    1449         this, codeBlock, profiledBlock, m_graph.m_blocks.size() - 1,
     1437        this, codeBlock, codeBlock, m_graph.m_blocks.size() - 1,
    14501438        expectedFunction, (VirtualRegister)m_inlineStackTop->remapOperand(
    14511439            usesResult ? resultOperand : InvalidVirtualRegister),
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r138741 r138763  
    488488#endif
    489489
    490 FunctionCodeBlock* FunctionExecutable::codeBlockWithBytecodeFor(CodeSpecializationKind kind)
    491 {
    492     return baselineCodeBlockFor(kind);
    493 }
    494 
    495490PassOwnPtr<FunctionCodeBlock> FunctionExecutable::produceCodeBlockFor(JSScope* scope, CodeSpecializationKind specializationKind, JSObject*& exception)
    496491{
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r138516 r138763  
    598598        }
    599599       
    600         FunctionCodeBlock* codeBlockWithBytecodeFor(CodeSpecializationKind);
    601        
    602600        PassOwnPtr<FunctionCodeBlock> produceCodeBlockFor(JSScope*, CodeSpecializationKind, JSObject*& exception);
    603601
Note: See TracChangeset for help on using the changeset viewer.