Ignore:
Timestamp:
Sep 26, 2021, 9:25:46 PM (4 years ago)
Author:
[email protected]
Message:

Unreviewed, reverting r283095.
https://bugs.webkit.org/show_bug.cgi?id=230815

We should land the original patch since this does not work
with bytecode cache

Reverted changeset:

"[JSC] Optimize PutByVal with for-in"
https://bugs.webkit.org/show_bug.cgi?id=230801
https://commits.webkit.org/r283095

Location:
trunk/Source/JavaScriptCore/bytecompiler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r283095 r283096  
    106106        CASE(OpJstricteq)
    107107        CASE(OpJneq)
    108         CASE(OpJeqPtr)
    109108        CASE(OpJneqPtr)
    110109        CASE(OpJnstricteq)
     
    14971496{
    14981497    OpJneqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::applyFunction), target.bind(this));
    1499 }
    1500 
    1501 void BytecodeGenerator::emitJumpIfSentinelString(RegisterID* cond, Label& target)
    1502 {
    1503     OpJeqPtr::emit(this, cond, emitLoad(nullptr, JSValue(vm().smallStrings.sentinelString())), target.bind(this));
    15041498}
    15051499
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r283095 r283096  
    859859        void emitJumpIfNotFunctionCall(RegisterID* cond, Label& target);
    860860        void emitJumpIfNotFunctionApply(RegisterID* cond, Label& target);
    861         void emitJumpIfSentinelString(RegisterID* cond, Label& target);
    862861        unsigned emitWideJumpIfNotFunctionHasOwnProperty(RegisterID* cond, Label& target);
    863862        void recordHasOwnPropertyInForInLoop(ForInContext&, unsigned branchOffset, Label& genericPath);
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r283095 r283096  
    42284228        // FIXME: We should have a way to see if anyone is actually using the propertyName for something other than a get_by_val. If not, we could eliminate the toString in this opcode.
    42294229        generator.emitEnumeratorNext(propertyName.get(), mode.get(), index.get(), base.get(), enumerator.get());
    4230         generator.emitJumpIfSentinelString(propertyName.get(), scope->breakTarget());
     4230
     4231        // Note, choosing undefined or null helps please DFG's Abstract Interpreter as it doesn't distinguish null and undefined as types (via SpecOther).
     4232        generator.emitJumpIfTrue(generator.emitIsUndefinedOrNull(generator.newTemporary(), propertyName.get()), scope->breakTarget());
    42314233
    42324234        this->emitLoopHeader(generator, propertyName.get());
Note: See TracChangeset for help on using the changeset viewer.