Ignore:
Timestamp:
Mar 11, 2013, 2:02:39 PM (12 years ago)
Author:
[email protected]
Message:

Make SegmentedVector Noncopyable
https://bugs.webkit.org/show_bug.cgi?id=112059

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Copying a SegmentedVector is very expensive, and really shouldn't
be necessary. So I've taken the one place where we currently copy
and replaced it with a regular Vector, and replaced the address
dependent logic with a indexing ref instead.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::newLabelScope):
(JSC::BytecodeGenerator::emitComplexJumpScopes):

  • bytecompiler/BytecodeGenerator.h:

(BytecodeGenerator):

  • bytecompiler/LabelScope.h:

(JSC):
(JSC::LabelScopePtr::LabelScopePtr):
(LabelScopePtr):
(JSC::LabelScopePtr::operator=):
(JSC::LabelScopePtr::~LabelScopePtr):
(JSC::LabelScopePtr::operator*):
(JSC::LabelScopePtr::operator->):

  • bytecompiler/NodesCodegen.cpp:

(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::LabelNode::emitBytecode):

Source/WTF:

Copying a SegmentedVector can be extraordinarily expensive, so we beat
it with the Noncopyable stick - that way we can ensure that if anyone
wants an actual copy they know what they're doing.

  • wtf/SegmentedVector.h:

(SegmentedVector):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r145329 r145401  
     12013-03-11  Oliver Hunt  <[email protected]>
     2
     3        Make SegmentedVector Noncopyable
     4        https://bugs.webkit.org/show_bug.cgi?id=112059
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Copying a SegmentedVector is very expensive, and really shouldn't
     9        be necessary.  So I've taken the one place where we currently copy
     10        and replaced it with a regular Vector, and replaced the address
     11        dependent logic with a indexing ref instead.
     12
     13        * bytecompiler/BytecodeGenerator.cpp:
     14        (JSC::BytecodeGenerator::newLabelScope):
     15        (JSC::BytecodeGenerator::emitComplexJumpScopes):
     16        * bytecompiler/BytecodeGenerator.h:
     17        (BytecodeGenerator):
     18        * bytecompiler/LabelScope.h:
     19        (JSC):
     20        (JSC::LabelScopePtr::LabelScopePtr):
     21        (LabelScopePtr):
     22        (JSC::LabelScopePtr::operator=):
     23        (JSC::LabelScopePtr::~LabelScopePtr):
     24        (JSC::LabelScopePtr::operator*):
     25        (JSC::LabelScopePtr::operator->):
     26        * bytecompiler/NodesCodegen.cpp:
     27        (JSC::DoWhileNode::emitBytecode):
     28        (JSC::WhileNode::emitBytecode):
     29        (JSC::ForNode::emitBytecode):
     30        (JSC::ForInNode::emitBytecode):
     31        (JSC::SwitchNode::emitBytecode):
     32        (JSC::LabelNode::emitBytecode):
     33
    1342013-03-10  Andreas Kling  <[email protected]>
    235
Note: See TracChangeset for help on using the changeset viewer.