Changeset 189561 in webkit


Ignore:
Timestamp:
Sep 9, 2015 5:27:32 PM (9 years ago)
Author:
Chris Dumez
Message:

Unreviewed, rolling out r189522.
https://bugs.webkit.org/show_bug.cgi?id=149020

"Caused a ~4% Speedometer regression" (Requested by cdumez on
#webkit).

Reverted changeset:

"Function.prototype.bind: Bound functions must use the
Prototype? of their target function instead of
Function.prototype"
https://bugs.webkit.org/show_bug.cgi?id=145605
http://trac.webkit.org/changeset/189522

Patch by Commit Queue <commit-queue@webkit.org> on 2015-09-09

Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r189556 r189561  
     12015-09-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r189522.
     4        https://bugs.webkit.org/show_bug.cgi?id=149020
     5
     6        "Caused a ~4% Speedometer regression" (Requested by cdumez on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "Function.prototype.bind: Bound functions must use the
     12        [[Prototype]] of their target function instead of
     13        Function.prototype"
     14        https://bugs.webkit.org/show_bug.cgi?id=145605
     15        http://trac.webkit.org/changeset/189522
     16
    1172015-09-09  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp

    r189522 r189561  
    3636
    3737EncodedJSValue JSC_HOST_CALL boundFunctionCall(ExecState* exec)
    38 {   
     38{
    3939    JSBoundFunction* boundFunction = jsCast<JSBoundFunction*>(exec->callee());
    4040
     
    8181    bool canConstruct = constructType != ConstructTypeNone;
    8282    NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor);
    83     JSValue targetPrototype = targetFunction->prototype();
    84     Structure* structure = JSBoundFunction::createStructure(vm, globalObject, targetPrototype);
    85     JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(vm, globalObject, structure, targetFunction, boundThis, boundArgs);
    86    
     83    JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(vm, globalObject, globalObject->boundFunctionStructure(), targetFunction, boundThis, boundArgs);
     84
    8785    function->finishCreation(vm, executable, length, name);
    8886    return function;
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r189525 r189561  
    272272    m_functionStructure.set(vm, this, JSFunction::createStructure(vm, this, m_functionPrototype.get()));
    273273    m_arrowFunctionStructure.set(vm, this, JSArrowFunction::createStructure(vm, this, m_functionPrototype.get()));
     274    m_boundFunctionStructure.set(vm, this, JSBoundFunction::createStructure(vm, this, m_functionPrototype.get()));
    274275    m_nativeStdFunctionStructure.set(vm, this, JSNativeStdFunction::createStructure(vm, this, m_functionPrototype.get()));
    275276    m_namedFunctionStructure.set(vm, this, Structure::addPropertyTransition(vm, m_functionStructure.get(), vm.propertyNames->name, DontDelete | ReadOnly | DontEnum, m_functionNameOffset));
     
    820821    visitor.append(&thisObject->m_calleeStructure);
    821822    visitor.append(&thisObject->m_functionStructure);
     823    visitor.append(&thisObject->m_boundFunctionStructure);
    822824    visitor.append(&thisObject->m_arrowFunctionStructure);
    823825    visitor.append(&thisObject->m_nativeStdFunctionStructure);
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r189522 r189561  
    256256    WriteBarrier<Structure> m_calleeStructure;
    257257    WriteBarrier<Structure> m_functionStructure;
     258    WriteBarrier<Structure> m_boundFunctionStructure;
    258259    WriteBarrier<Structure> m_arrowFunctionStructure;
    259260    WriteBarrier<Structure> m_nativeStdFunctionStructure;
     
    490491    Structure* calleeStructure() const { return m_calleeStructure.get(); }
    491492    Structure* functionStructure() const { return m_functionStructure.get(); }
     493    Structure* boundFunctionStructure() const { return m_boundFunctionStructure.get(); }
    492494    Structure* arrowFunctionStructure() const { return m_arrowFunctionStructure.get(); }
    493495    Structure* nativeStdFunctionStructure() const { return m_nativeStdFunctionStructure.get(); }
  • trunk/Source/JavaScriptCore/tests/es6.yaml

    r189522 r189561  
    882882  cmd: runES6 :fail
    883883- path: es6/prototype_of_bound_functions_arrow_functions.js
    884   cmd: runES6 :normal
     884  cmd: runES6 :fail
    885885- path: es6/prototype_of_bound_functions_basic_functions.js
    886   cmd: runES6 :normal
     886  cmd: runES6 :fail
    887887- path: es6/prototype_of_bound_functions_classes.js
    888   cmd: runES6 :normal
     888  cmd: runES6 :fail
    889889- path: es6/prototype_of_bound_functions_generator_functions.js
    890890  cmd: runES6 :fail
    891891- path: es6/prototype_of_bound_functions_subclasses.js
    892   cmd: runES6 :normal
     892  cmd: runES6 :fail
    893893- path: es6/Proxy_apply_handler.js
    894894  cmd: runES6 :fail
Note: See TracChangeset for help on using the changeset viewer.