Ignore:
Timestamp:
Jan 29, 2013, 9:43:47 PM (12 years ago)
Author:
[email protected]
Message:

Be a little more conservative about emitting table-based switches
https://bugs.webkit.org/show_bug.cgi?id=108292

Reviewed by Filip Pizlo.

Profiling shows we're using op_switch in cases where it's a regression.

  • bytecompiler/NodesCodegen.cpp:

(JSC):
(JSC::length):
(JSC::CaseBlockNode::tryTableSwitch):
(JSC::CaseBlockNode::emitBytecodeForBlock):

  • parser/Nodes.h:

(CaseBlockNode):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r140947 r141222  
    15101510
    15111511    private:
    1512         SwitchInfo::SwitchType tryOptimizedSwitch(Vector<ExpressionNode*, 8>& literalVector, int32_t& min_num, int32_t& max_num);
     1512        SwitchInfo::SwitchType tryTableSwitch(Vector<ExpressionNode*, 8>& literalVector, int32_t& min_num, int32_t& max_num);
     1513        static const size_t s_tableSwitchMinimum = 10;
    15131514        ClauseListNode* m_list1;
    15141515        CaseClauseNode* m_defaultClause;
Note: See TracChangeset for help on using the changeset viewer.