Ignore:
Timestamp:
Dec 1, 2015, 6:39:58 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

Unreviewed, rolling out r192876.

It broke a lot of JSC and layout tests for GTK and EFL

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/192876

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r192876 r192882  
    45154515            NEXT_OPCODE(op_get_scope);
    45164516        }
     4517
     4518        case op_load_arrowfunction_this: {
     4519            Node* callee = get(VirtualRegister(JSStack::Callee));
     4520            Node* result;
     4521            if (JSArrowFunction* function = callee->dynamicCastConstant<JSArrowFunction*>())
     4522                result = jsConstant(function->boundThis());
     4523            else
     4524                result = addToGraph(LoadArrowFunctionThis, callee);
     4525            set(VirtualRegister(currentInstruction[1].u.operand), result);
     4526            NEXT_OPCODE(op_load_arrowfunction_this);
     4527        }
    45174528           
    45184529        case op_create_direct_arguments: {
     
    45644575        }
    45654576
    4566         case op_new_func_exp:
    4567         case op_new_arrow_func_exp: {
     4577        case op_new_func_exp: {
    45684578            FunctionExecutable* expr = m_inlineStackTop->m_profiledBlock->functionExpr(currentInstruction[3].u.operand);
    45694579            FrozenValue* frozen = m_graph.freezeStrong(expr);
    45704580            set(VirtualRegister(currentInstruction[1].u.operand),
    45714581                addToGraph(NewFunction, OpInfo(frozen), get(VirtualRegister(currentInstruction[2].u.operand))));
    4572            
    4573             if (opcodeID == op_new_func_exp) {
    4574                 // Curly braces are necessary
    4575                 NEXT_OPCODE(op_new_func_exp);
    4576             } else {
    4577                 // Curly braces are necessary
    4578                 NEXT_OPCODE(op_new_arrow_func_exp);
    4579             }
     4582            NEXT_OPCODE(op_new_func_exp);
     4583        }
     4584
     4585        case op_new_arrow_func_exp: {
     4586            FunctionExecutable* expr = m_inlineStackTop->m_profiledBlock->functionExpr(currentInstruction[3].u.operand);
     4587            FrozenValue* frozen = m_graph.freezeStrong(expr);
     4588
     4589            set(VirtualRegister(currentInstruction[1].u.operand),
     4590                addToGraph(NewArrowFunction, OpInfo(frozen),
     4591                    get(VirtualRegister(currentInstruction[2].u.operand)),
     4592                    get(VirtualRegister(currentInstruction[4].u.operand))));
     4593           
     4594            NEXT_OPCODE(op_new_arrow_func_exp);
    45804595        }
    45814596
Note: See TracChangeset for help on using the changeset viewer.