Changeset 167313 in webkit


Ignore:
Timestamp:
Apr 15, 2014 10:46:42 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r167199 and r167251.
https://bugs.webkit.org/show_bug.cgi?id=131678

Caused a DYEBench regression and does not seem to improve perf
on relevant websites (Requested by rniwa on #webkit).

Reverted changesets:

"Rewrite Function.bind as a builtin"
https://bugs.webkit.org/show_bug.cgi?id=131083
http://trac.webkit.org/changeset/167199

"Update test result"
http://trac.webkit.org/changeset/167251

Location:
trunk
Files:
2 added
3 deleted
71 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167311 r167313  
     12014-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r167199 and r167251.
     4        https://bugs.webkit.org/show_bug.cgi?id=131678
     5
     6        Caused a DYEBench regression and does not seem to improve perf
     7        on relevant websites (Requested by rniwa on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Rewrite Function.bind as a builtin"
     12        https://bugs.webkit.org/show_bug.cgi?id=131083
     13        http://trac.webkit.org/changeset/167199
     14
     15        "Update test result"
     16        http://trac.webkit.org/changeset/167251
     17
    1182014-04-15  Alexey Proskuryakov  <ap@apple.com>
    219
  • trunk/LayoutTests/js/dom/function-bind-expected.txt

    r167199 r167313  
    44
    55
    6 PASS new (decodeURI.bind())() threw exception TypeError: function is not a constructor.
     6PASS new (decodeURI.bind())() threw exception TypeError: function is not a constructor (evaluating 'new (decodeURI.bind())()').
    77PASS (new (String.bind())('foo')).toString() is 'foo'
    88PASS result is "[object Window] -> x:1, y:2"
     
    2424PASS "prototype" in G is false
    2525PASS "prototype" in H is false
    26 PASS Function.bind.call(undefined) threw exception TypeError: Cannot bind non-function object..
     26PASS Function.bind.call(undefined) threw exception TypeError: Type error.
    2727PASS abcAt(1) is "b"
    28 PASS new abcAt(1) threw exception TypeError: function is not a constructor.
     28PASS new abcAt(1) threw exception TypeError: function is not a constructor (evaluating 'new abcAt(1)').
    2929PASS boundFunctionPrototypeAccessed is false
    3030PASS Function.bind.length is 1
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r167199 r167313  
    128128    JSCallbackConstructor* constructor = JSCallbackConstructor::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor);
    129129    constructor->putDirect(exec->vm(), exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
    130     constructor->putDirect(exec->vm(), exec->propertyNames().prototypeForHasInstancePrivateName, jsPrototype, DontEnum | DontDelete | ReadOnly);
    131130    return toRef(constructor);
    132131}
  • trunk/Source/JavaScriptCore/API/JSScriptRef.cpp

    r167199 r167313  
    6969static bool parseScript(VM* vm, const SourceCode& source, ParserError& error)
    7070{
    71     return JSC::parse<JSC::ProgramNode>(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, JSNotFunctionKind, error);
     71    return JSC::parse<JSC::ProgramNode>(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
    7272}
    7373
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r167199 r167313  
    395395    runtime/JSArrayBufferView.cpp
    396396    runtime/JSArrayIterator.cpp
     397    runtime/JSBoundFunction.cpp
    397398    runtime/JSCJSValue.cpp
    398399    runtime/JSCell.cpp
  • trunk/Source/JavaScriptCore/ChangeLog

    r167297 r167313  
     12014-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r167199 and r167251.
     4        https://bugs.webkit.org/show_bug.cgi?id=131678
     5
     6        Caused a DYEBench regression and does not seem to improve perf
     7        on relevant websites (Requested by rniwa on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Rewrite Function.bind as a builtin"
     12        https://bugs.webkit.org/show_bug.cgi?id=131083
     13        http://trac.webkit.org/changeset/167199
     14
     15        "Update test result"
     16        http://trac.webkit.org/changeset/167251
     17
    1182014-04-14  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj

    r167199 r167313  
    641641    <ClCompile Include="..\runtime\JSArrayBufferPrototype.cpp" />
    642642    <ClCompile Include="..\runtime\JSArrayBufferView.cpp" />
     643    <ClCompile Include="..\runtime\JSBoundFunction.cpp" />
    643644    <ClCompile Include="..\runtime\JSCJSValue.cpp" />
    644645    <ClCompile Include="..\runtime\JSCell.cpp" />
     
    13011302    <ClInclude Include="..\runtime\JSArrayBufferViewInlines.h" />
    13021303    <ClInclude Include="..\runtime\JSArrayIterator.h" />
     1304    <ClInclude Include="..\runtime\JSBoundFunction.h" />
    13031305    <ClInclude Include="..\runtime\JSCInlines.h" />
    13041306    <ClInclude Include="..\runtime\JSCJSValue.h" />
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters

    r167199 r167313  
    607607      <Filter>runtime</Filter>
    608608    </ClCompile>
     609    <ClCompile Include="..\runtime\JSBoundFunction.cpp">
     610      <Filter>runtime</Filter>
     611    </ClCompile>
    609612    <ClCompile Include="..\runtime\JSCell.cpp">
    610613      <Filter>runtime</Filter>
     
    22512254    </ClInclude>
    22522255    <ClInclude Include="..\runtime\JSArray.h">
     2256      <Filter>runtime</Filter>
     2257    </ClInclude>
     2258    <ClInclude Include="..\runtime\JSBoundFunction.h">
    22532259      <Filter>runtime</Filter>
    22542260    </ClInclude>
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r167199 r167313  
    12161216                86F3EEBE168CDE930077B92A /* ObjCCallbackFunction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86F3EEBA168CCF750077B92A /* ObjCCallbackFunction.mm */; };
    12171217                86F3EEBF168CDE930077B92A /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F3EEB616855A5B0077B92A /* ObjcRuntimeExtras.h */; };
     1218                86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */; };
     1219                86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */; };
    12181220                90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */; };
    12191221                90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    27882790                86F75EFC151C062F007C9BA3 /* RegExpCachedResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpCachedResult.h; sourceTree = "<group>"; };
    27892791                86F75EFD151C062F007C9BA3 /* RegExpMatchesArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpMatchesArray.cpp; sourceTree = "<group>"; };
     2792                86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBoundFunction.cpp; sourceTree = "<group>"; };
     2793                86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBoundFunction.h; sourceTree = "<group>"; };
    27902794                90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = "<group>"; };
    27912795                90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = "<group>"; };
     
    43194323                                A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */,
    43204324                                A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */,
     4325                                86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */,
     4326                                86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */,
    43214327                                BC7F8FBA0E19D1EF008632C0 /* JSCell.cpp */,
    43224328                                BC1167D80E19BCC9008066DD /* JSCell.h */,
     
    59345940                                BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */,
    59355941                                140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */,
     5942                                86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
    59365943                                BC18C4190E16F5CD00B34460 /* JSCallbackConstructor.h in Headers */,
    59375944                                BC18C41A0E16F5CD00B34460 /* JSCallbackFunction.h in Headers */,
     
    71277134                                A7BDAECA17F4EA1400F6140C /* JSArrayIterator.cpp in Sources */,
    71287135                                1421359B0A677F4F00A8195E /* JSBase.cpp in Sources */,
     7136                                86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
    71297137                                1440F8AF0A508D200005F061 /* JSCallbackConstructor.cpp in Sources */,
    71307138                                1440F8920A508B100005F061 /* JSCallbackFunction.cpp in Sources */,
  • trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp

    r167199 r167313  
    4747    JSTextPosition positionBeforeLastNewline;
    4848    ParserError error;
    49     RefPtr<ProgramNode> program = parse<ProgramNode>(&m_vm, source, 0, Identifier(), JSParseBuiltin, JSParseProgramCode, JSNotFunctionKind, error, &positionBeforeLastNewline);
     49    RefPtr<ProgramNode> program = parse<ProgramNode>(&m_vm, source, 0, Identifier(), JSParseBuiltin, JSParseProgramCode, error, &positionBeforeLastNewline);
    5050
    5151    if (!program) {
     
    7272    for (const auto& closedVariable : program->closedVariables()) {
    7373        if (closedVariable == m_vm.propertyNames->arguments.impl())
    74             continue;
     74        continue;
    7575       
    7676        if (closedVariable == m_vm.propertyNames->undefinedKeyword.impl())
  • trunk/Source/JavaScriptCore/builtins/Function.prototype.js

    r167297 r167313  
    3333    return this.@apply(thisValue, argumentValues);
    3434}
    35 
    36 function bind(thisValue /*, optional arguments */)
    37 {
    38     "use strict";
    39     var boundFunction = this;
    40     if (typeof boundFunction !== "function")
    41         throw new @TypeError("Cannot bind non-function object.");
    42     var bindingFunction;
    43     var oversizedCall = undefined;
    44     if (arguments.length <= 1) {
    45         bindingFunction = function () {
    46             if (@IsConstructor)
    47                 return new boundFunction(...arguments);
    48             return boundFunction.@apply(thisValue, arguments);
    49         }
    50     } else {
    51         var length = arguments.length;
    52         switch (length - 1 /* skip thisValue */) {
    53         case 1: {
    54             var boundParameter = arguments[1];
    55             bindingFunction = function () {
    56                 var argumentLength = arguments.length;
    57                 if (!argumentLength) {
    58                     if (@IsConstructor)
    59                         return new boundFunction(boundParameter);
    60                     return boundFunction.@call(thisValue, boundParameter);
    61                 }
    62                 if (argumentLength == 1) {
    63                     if (@IsConstructor)
    64                         return new boundFunction(boundParameter, arguments[0]);
    65                     return boundFunction.@call(thisValue, boundParameter, arguments[0]);
    66                 }
    67                 if (argumentLength == 2) {
    68                     if (@IsConstructor)
    69                         return new boundFunction(boundParameter, arguments[0], arguments[1]);
    70                     return boundFunction.@call(thisValue, boundParameter, arguments[0], arguments[1]);
    71                 }
    72                 if (argumentLength == 3) {
    73                     if (@IsConstructor)
    74                         return new boundFunction(boundParameter, arguments[0], arguments[1], arguments[2]);
    75                     return boundFunction.@call(thisValue, boundParameter, arguments[0], arguments[1], arguments[2]);
    76                 }
    77                 var completeArguments = [boundParameter, ...arguments];
    78                 if (!oversizedCall) {
    79                     oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
    80                         if (isConstruct)
    81                             return new boundFunction(...completeArguments);
    82                         return boundFunction.@apply(thisValue, completeArguments);
    83                     }
    84                 }
    85                 return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
    86             }
    87             break;
    88         }
    89         case 2: {
    90             var boundParameter1 = arguments[1];
    91             var boundParameter2 = arguments[2];
    92             bindingFunction = function () {
    93                 if (!arguments.length) {
    94                     if (@IsConstructor)
    95                         return new boundFunction(boundParameter1, boundParameter2);
    96                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2);
    97                 }
    98                 if (arguments.length == 1) {
    99                     if (@IsConstructor)
    100                         return new boundFunction(boundParameter1, boundParameter2, arguments[0]);
    101                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, arguments[0]);
    102                 }
    103                 if (arguments.length == 2) {
    104                     if (@IsConstructor)
    105                         return new boundFunction(boundParameter1, boundParameter2, arguments[0], arguments[1]);
    106                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, arguments[0], arguments[1]);
    107                 }
    108                 if (arguments.length == 3) {
    109                     if (@IsConstructor)
    110                         return new boundFunction(boundParameter1, boundParameter2, arguments[0], arguments[1], arguments[2]);
    111                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, arguments[0], arguments[1], arguments[2]);
    112                 }
    113                 var completeArguments = [boundParameter1, boundParameter2, ...arguments];
    114                 if (!oversizedCall) {
    115                     oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
    116                         if (isConstruct)
    117                             return new boundFunction(...completeArguments);
    118                         return boundFunction.@apply(thisValue, completeArguments);
    119                     }
    120                 }
    121                 return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
    122             }
    123             break;
    124         }
    125         case 3: {
    126             var boundParameter1 = arguments[1];
    127             var boundParameter2 = arguments[2];
    128             var boundParameter3 = arguments[3];
    129             bindingFunction = function () {
    130                 if (!arguments.length) {
    131                     if (@IsConstructor)
    132                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3);
    133                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3);
    134                 }
    135                 if (arguments.length == 1) {
    136                     if (@IsConstructor)
    137                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3, arguments[0]);
    138                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3, arguments[0]);
    139                 }
    140                 if (arguments.length == 2) {
    141                     if (@IsConstructor)
    142                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1]);
    143                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1]);
    144                 }
    145                 if (arguments.length == 3) {
    146                     if (@IsConstructor)
    147                         return new boundFunction(boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1], arguments[2]);
    148                     return boundFunction.@call(thisValue, boundParameter1, boundParameter2, boundParameter3, arguments[0], arguments[1], arguments[2]);
    149                 }
    150                 var completeArguments = [boundParameter1, boundParameter2, boundParameter3, ...arguments];
    151                 if (!oversizedCall) {
    152                     oversizedCall = function (isConstruct, boundFunction, thisValue, completeArguments) {
    153                         if (isConstruct)
    154                             return new boundFunction(...completeArguments);
    155                         return boundFunction.@apply(thisValue, completeArguments);
    156                     }
    157                 }
    158                 return oversizedCall(@IsConstructor, boundFunction, thisValue, completeArguments);
    159             }
    160             break;
    161         }
    162         default:
    163             var boundParameters = [];
    164             for (var i = 1; i < length; i++)
    165                 boundParameters[i - 1] = arguments[i];
    166            
    167             bindingFunction = function () {
    168                 if (!arguments.length) {
    169                     if (@IsConstructor)
    170                         return new boundFunction(...boundParameters);
    171                     return boundFunction.@apply(thisValue, boundParameters);
    172                 }
    173                
    174                 var completeArguments = [];
    175                 var localBoundParameters = boundParameters;
    176                 var boundLength = localBoundParameters.length;
    177                 for (var i = 0; i < boundLength; i++)
    178                     completeArguments[i] = localBoundParameters[i];
    179                 for (var i = 0; i < arguments.length; i++)
    180                     completeArguments[i + boundLength] = arguments[i];
    181                 if (@IsConstructor)
    182                     return new boundFunction(...completeArguments);
    183                 else
    184                     return boundFunction.@apply(thisValue, completeArguments);
    185             }
    186         }
    187     }
    188     bindingFunction.@boundFunctionName = this.name;
    189     bindingFunction.@boundFunction = boundFunction.@boundFunction || boundFunction;
    190     var boundLength = boundFunction.length - (arguments.length - 1);
    191     if (boundLength < 0)
    192         boundLength = 0;
    193     bindingFunction.@boundFunctionLength = boundLength;
    194     @SetTypeErrorAccessor(bindingFunction, "arguments");
    195     @SetTypeErrorAccessor(bindingFunction, "caller");
    196     return bindingFunction;
    197 }
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r167199 r167313  
    5252static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, ParserError& error)
    5353{
    54     RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable->toStrictness(), JSParseFunctionCode, kind == CodeForConstruct ? JSFunctionIsConstructorKind : JSFunctionIsFunctionKind, error);
     54    RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable->toStrictness(), JSParseFunctionCode, error);
    5555
    5656    if (!body) {
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r167199 r167313  
    12861286
    12871287    generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
    1288     generator.emitGetById(prototype.get(), src2.get(), generator.vm()->propertyNames->prototypeForHasInstancePrivateName);
     1288    generator.emitGetById(prototype.get(), src2.get(), generator.vm()->propertyNames->prototype);
    12891289
    12901290    generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
     
    16971697{
    16981698    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
    1699     bool constantBranch = false;
    1700     if (m_condition->getBooleanConstant(constantBranch)) {
    1701         if (constantBranch)
    1702             generator.emitNode(dst, m_ifBlock);
    1703         else if (m_elseBlock)
    1704             generator.emitNode(dst, m_elseBlock);
    1705         return;
    1706     }
     1699   
    17071700    RefPtr<Label> beforeThen = generator.newLabel();
    17081701    RefPtr<Label> beforeElse = generator.newLabel();
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r167199 r167313  
    4545#include "JSActivation.h"
    4646#include "JSArray.h"
     47#include "JSBoundFunction.h"
    4748#include "JSNameScope.h"
    4849#include "JSNotAnObject.h"
  • trunk/Source/JavaScriptCore/parser/Lexer.cpp

    r167199 r167313  
    490490
    491491template <typename T>
    492 Lexer<T>::Lexer(VM* vm, JSParserStrictness strictness, JSFunctionKind functionKind)
     492Lexer<T>::Lexer(VM* vm, JSParserStrictness strictness)
    493493    : m_isReparsing(false)
    494494    , m_vm(vm)
    495495    , m_parsingBuiltinFunction(strictness == JSParseBuiltin)
    496     , m_functionKind(functionKind)
    497496{
    498497}
     
    821820            else if (*ident == m_vm->propertyNames->undefinedKeyword)
    822821                tokenData->ident = &m_vm->propertyNames->undefinedPrivateName;
    823            
    824822            if (!ident)
    825823                return INVALID_PRIVATE_NAME_ERRORTOK;
    826            
    827             if (*ident == m_vm->propertyNames->IsConstructorPrivateName)
    828                 return m_functionKind == JSFunctionIsConstructorKind ? TRUETOKEN : FALSETOKEN;
    829            
    830824        }
    831825        tokenData->ident = ident;
     
    903897            else if (*ident == m_vm->propertyNames->undefinedKeyword)
    904898                tokenData->ident = &m_vm->propertyNames->undefinedPrivateName;
    905             if (m_functionKind == JSFunctionIsConstructorKind) {
    906                 if (*ident == m_vm->propertyNames->IsConstructorPrivateName)
    907                     return TRUETOKEN;
    908                 return FALSETOKEN;
    909             }
    910899            if (!ident)
    911900                return INVALID_PRIVATE_NAME_ERRORTOK;
  • trunk/Source/JavaScriptCore/parser/Lexer.h

    r167199 r167313  
    7272
    7373public:
    74     Lexer(VM*, JSParserStrictness, JSFunctionKind);
     74    Lexer(VM*, JSParserStrictness);
    7575    ~Lexer();
    7676
     
    239239    VM* m_vm;
    240240    bool m_parsingBuiltinFunction;
    241     JSFunctionKind m_functionKind;
    242241};
    243242
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r167199 r167313  
    165165        virtual bool isBoolean() const { return false; }
    166166        virtual bool isSpreadExpression() const { return false; }
    167         virtual bool getBooleanConstant(bool&) const { return false; }
    168167
    169168        virtual void emitBytecodeInConditionContext(BytecodeGenerator&, Label*, Label*, FallThroughMode);
     
    215214
    216215    private:
    217        
    218         bool getBooleanConstant(bool& value) const override
    219         {
    220             value = false;
    221             return true;
    222         }
    223        
    224216        virtual bool isNull() const override { return true; }
    225217        virtual JSValue jsValue(BytecodeGenerator&) const override { return jsNull(); }
     
    230222        BooleanNode(const JSTokenLocation&, bool value);
    231223        bool value() { return m_value; }
    232        
    233     private:
    234         bool getBooleanConstant(bool& value) const override
    235         {
    236             value = m_value;
    237             return true;
    238         }
    239 
     224
     225    private:
    240226        virtual bool isBoolean() const override { return true; }
    241227        virtual JSValue jsValue(BytecodeGenerator&) const override { return jsBoolean(m_value); }
     
    251237
    252238    private:
    253         bool getBooleanConstant(bool& value) const override
    254         {
    255             value = (bool)m_value;
    256             return true;
    257         }
    258239        virtual bool isNumber() const override { return true; }
    259240        virtual JSValue jsValue(BytecodeGenerator&) const override { return jsNumber(m_value); }
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r167199 r167313  
    193193
    194194template <typename LexerType>
    195 Parser<LexerType>::Parser(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, JSFunctionKind functionKind)
     195Parser<LexerType>::Parser(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode)
    196196    : m_vm(vm)
    197197    , m_source(&source)
     
    208208    , m_parsingBuiltin(strictness == JSParseBuiltin)
    209209{
    210     m_lexer = adoptPtr(new LexerType(vm, strictness, functionKind));
     210    m_lexer = adoptPtr(new LexerType(vm, strictness));
    211211    m_arena = m_vm->parserArena.get();
    212212    m_lexer->setCode(source, m_arena);
     
    284284    Vector<RefPtr<StringImpl>> closedVariables;
    285285    if (m_parsingBuiltin) {
     286        RELEASE_ASSERT(!capturedVariables.size());
    286287        IdentifierSet usedVariables;
    287288        scope->getUsedVariables(usedVariables);
     
    293294                continue;
    294295            closedVariables.append(variable);
    295         }
    296         if (!capturedVariables.isEmpty()) {
    297             for (const auto& capturedVariable : capturedVariables) {
    298                 if (scope->hasDeclaredVariable(Identifier(m_vm, capturedVariable.get())))
    299                     continue;
    300                
    301                 if (scope->hasDeclaredParameter(Identifier(m_vm, capturedVariable.get())))
    302                     continue;
    303                 RELEASE_ASSERT_NOT_REACHED();
    304             }
    305296        }
    306297    }
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r167199 r167313  
    412412
    413413public:
    414     Parser(VM*, const SourceCode&, FunctionParameters*, const Identifier&, JSParserStrictness, JSParserMode, JSFunctionKind);
     414    Parser(VM*, const SourceCode&, FunctionParameters*, const Identifier&, JSParserStrictness, JSParserMode);
    415415    ~Parser();
    416416
     
    955955
    956956template <class ParsedNode>
    957 PassRefPtr<ParsedNode> parse(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, JSFunctionKind functionKind, ParserError& error, JSTextPosition* positionBeforeLastNewline = 0)
     957PassRefPtr<ParsedNode> parse(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, ParserError& error, JSTextPosition* positionBeforeLastNewline = 0)
    958958{
    959959    SamplingRegion samplingRegion("Parsing");
     
    961961    ASSERT(!source.provider()->source().isNull());
    962962    if (source.provider()->source().is8Bit()) {
    963         Parser<Lexer<LChar>> parser(vm, source, parameters, name, strictness, parserMode, functionKind);
     963        Parser<Lexer<LChar>> parser(vm, source, parameters, name, strictness, parserMode);
    964964        RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error);
    965965        if (positionBeforeLastNewline)
     
    973973        return result.release();
    974974    }
    975     Parser<Lexer<UChar>> parser(vm, source, parameters, name, strictness, parserMode, functionKind);
     975    Parser<Lexer<UChar>> parser(vm, source, parameters, name, strictness, parserMode);
    976976    RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error);
    977977    if (positionBeforeLastNewline)
  • trunk/Source/JavaScriptCore/parser/ParserModes.h

    r167199 r167313  
    3434enum JSParserStrictness { JSParseNormal, JSParseBuiltin, JSParseStrict };
    3535enum JSParserMode { JSParseProgramCode, JSParseFunctionCode };
    36 enum JSFunctionKind { JSNotFunctionKind, JSFunctionIsFunctionKind, JSFunctionIsConstructorKind };
    37    
     36
    3837enum ProfilerMode { ProfilerOff, ProfilerOn };
    3938enum DebuggerMode { DebuggerOff, DebuggerOn };
  • trunk/Source/JavaScriptCore/runtime/ArgumentsIteratorConstructor.cpp

    r167199 r167313  
    4040{
    4141    Base::finishCreation(vm);
    42     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4343}
    4444
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r167199 r167313  
    6363{
    6464    Base::finishCreation(vm, arrayPrototype->classInfo()->className);
    65     putDirectPrototypePropertyWithoutTransitions(vm, arrayPrototype, DontEnum | DontDelete | ReadOnly);
     65    putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
    6666    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6767}
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp

    r167199 r167313  
    4040{
    4141    Base::finishCreation(vm, booleanPrototype->classInfo()->className);
    42     putDirectPrototypePropertyWithoutTransitions(vm, booleanPrototype, DontEnum | DontDelete | ReadOnly);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
    4343
    4444    // no. of arguments for constructor
  • trunk/Source/JavaScriptCore/runtime/CodeCache.cpp

    r167199 r167313  
    9393
    9494    typedef typename CacheTypes<UnlinkedCodeBlockType>::RootNode RootNode;
    95     RefPtr<RootNode> rootNode = parse<RootNode>(&vm, source, 0, Identifier(), strictness, JSParseProgramCode, JSNotFunctionKind, error);
     95    RefPtr<RootNode> rootNode = parse<RootNode>(&vm, source, 0, Identifier(), strictness, JSParseProgramCode, error);
    9696    if (!rootNode) {
    9797        m_sourceCode.remove(addResult.iterator);
     
    143143
    144144    JSTextPosition positionBeforeLastNewline;
    145     RefPtr<ProgramNode> program = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, JSNotFunctionKind, error, &positionBeforeLastNewline);
     145    RefPtr<ProgramNode> program = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error, &positionBeforeLastNewline);
    146146    if (!program) {
    147147        RELEASE_ASSERT(error.m_type != ParserError::ErrorNone);
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r167297 r167313  
    220220    macro(TypeError) \
    221221    macro(undefined) \
    222     macro(BuiltinLog) \
    223     macro(IsConstructor) \
    224     macro(boundFunctionName) \
    225     macro(boundFunctionParameters) \
    226     macro(boundFunction) \
    227     macro(boundFunctionLength) \
    228     macro(prototypeForHasInstance) \
    229     macro(SetTypeErrorAccessor)
     222    macro(BuiltinLog)
    230223
    231224namespace JSC {
  • trunk/Source/JavaScriptCore/runtime/Completion.cpp

    r167199 r167313  
    5656    JSLockHolder lock(vm);
    5757    RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
    58     RefPtr<ProgramNode> programNode = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, JSNotFunctionKind, error);
     58    RefPtr<ProgramNode> programNode = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
    5959    return programNode;
    6060}
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r167199 r167313  
    109109{
    110110    Base::finishCreation(vm, datePrototype->classInfo()->className);
    111     putDirectPrototypePropertyWithoutTransitions(vm, datePrototype, DontEnum | DontDelete | ReadOnly);
     111    putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
    112112    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
    113113}
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r167199 r167313  
    4343    Base::finishCreation(vm, errorPrototype->classInfo()->className);
    4444    // ECMA 15.11.3.1 Error.prototype
    45     putDirectPrototypePropertyWithoutTransitions(vm, errorPrototype, DontEnum | DontDelete | ReadOnly);
     45    putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
    4646    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
    4747}
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r167199 r167313  
    448448    VM* vm = &exec->vm();
    449449    JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
    450     RefPtr<ProgramNode> programNode = parse<ProgramNode>(vm, m_source, 0, Identifier(), JSParseNormal, ProgramNode::isFunctionNode ? JSParseFunctionCode : JSParseProgramCode, JSNotFunctionKind, error);
     450    RefPtr<ProgramNode> programNode = parse<ProgramNode>(vm, m_source, 0, Identifier(), JSParseNormal, ProgramNode::isFunctionNode ? JSParseFunctionCode : JSParseProgramCode, error);
    451451    if (programNode)
    452452        return 0;
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r167199 r167313  
    4848{
    4949    Base::finishCreation(vm, functionPrototype->classInfo()->className);
    50     putDirectPrototypePropertyWithoutTransitions(vm, functionPrototype, DontEnum | DontDelete | ReadOnly);
     50    putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
    5151
    5252    // Number of arguments for constructor
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r167199 r167313  
    2626#include "BuiltinNames.h"
    2727#include "JSArray.h"
     28#include "JSBoundFunction.h"
    2829#include "JSFunction.h"
    2930#include "JSString.h"
     
    4041
    4142static EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState*);
     43static EncodedJSValue JSC_HOST_CALL functionProtoFuncBind(ExecState*);
    4244
    4345FunctionPrototype::FunctionPrototype(VM& vm, Structure* structure)
     
    6163    *applyFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().applyPublicName(), functionPrototypeApplyCodeGenerator(vm), DontEnum);
    6264    *callFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().callPublicName(), functionPrototypeCallCodeGenerator(vm), DontEnum);
    63    
    64     putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().bindPublicName(), functionPrototypeBindCodeGenerator(vm), DontEnum);
     65
     66    JSFunction* bindFunction = JSFunction::create(vm, globalObject, 1, vm.propertyNames->bind.string(), functionProtoFuncBind);
     67    putDirectWithoutTransition(vm, vm.propertyNames->bind, bindFunction, DontEnum);
    6568}
    6669
     
    119122}
    120123
     124// 15.3.4.5 Function.prototype.bind (thisArg [, arg1 [, arg2, ...]])
     125EncodedJSValue JSC_HOST_CALL functionProtoFuncBind(ExecState* exec)
     126{
     127    JSGlobalObject* globalObject = exec->callee()->globalObject();
     128
     129    // Let Target be the this value.
     130    JSValue target = exec->thisValue();
     131
     132    // If IsCallable(Target) is false, throw a TypeError exception.
     133    CallData callData;
     134    CallType callType = getCallData(target, callData);
     135    if (callType == CallTypeNone)
     136        return throwVMTypeError(exec);
     137    // Primitive values are not callable.
     138    ASSERT(target.isObject());
     139    JSObject* targetObject = asObject(target);
     140    VM& vm = exec->vm();
     141
     142    // Let A be a new (possibly empty) internal list of all of the argument values provided after thisArg (arg1, arg2 etc), in order.
     143    size_t numBoundArgs = exec->argumentCount() > 1 ? exec->argumentCount() - 1 : 0;
     144    JSArray* boundArgs = JSArray::tryCreateUninitialized(vm, globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithUndecided), numBoundArgs);
     145    if (!boundArgs)
     146        return JSValue::encode(throwOutOfMemoryError(exec));
     147
     148    for (size_t i = 0; i < numBoundArgs; ++i)
     149        boundArgs->initializeIndex(vm, i, exec->argument(i + 1));
     150
     151    // If the [[Class]] internal property of Target is "Function", then ...
     152    // Else set the length own property of F to 0.
     153    unsigned length = 0;
     154    if (targetObject->inherits(JSFunction::info())) {
     155        ASSERT(target.get(exec, exec->propertyNames().length).isNumber());
     156        // a. Let L be the length property of Target minus the length of A.
     157        // b. Set the length own property of F to either 0 or L, whichever is larger.
     158        unsigned targetLength = (unsigned)target.get(exec, exec->propertyNames().length).asNumber();
     159        if (targetLength > numBoundArgs)
     160            length = targetLength - numBoundArgs;
     161    }
     162
     163    JSString* name = target.get(exec, exec->propertyNames().name).toString(exec);
     164    return JSValue::encode(JSBoundFunction::create(vm, globalObject, targetObject, exec->argument(0), boundArgs, length, name->value(exec)));
     165}
     166
    121167} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp

    r167199 r167313  
    5151{
    5252    Base::finishCreation(vm, "ArrayBuffer");
    53     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     53    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    5454    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | DontDelete | ReadOnly);
    5555
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r167199 r167313  
    3434#include "GetterSetter.h"
    3535#include "JSArray.h"
     36#include "JSBoundFunction.h"
    3637#include "JSFunctionInlines.h"
    3738#include "JSGlobalObject.h"
     
    251252class RetrieveCallerFunctionFunctor {
    252253public:
    253     RetrieveCallerFunctionFunctor(ExecState* exec, JSFunction* functionObj)
    254         : m_exec(exec)
    255         , m_targetCallee(jsDynamicCast<JSObject*>(functionObj))
     254    RetrieveCallerFunctionFunctor(JSFunction* functionObj)
     255        : m_targetCallee(jsDynamicCast<JSObject*>(functionObj))
    256256        , m_hasFoundFrame(false)
    257257        , m_hasSkippedToCallerFrame(false)
     
    266266        JSObject* callee = visitor->callee();
    267267
    268         if (callee && callee->hasOwnProperty(m_exec, m_exec->propertyNames().boundFunctionNamePrivateName))
     268        if (callee && callee->inherits(JSBoundFunction::info()))
    269269            return StackVisitor::Continue;
    270270
     
    284284
    285285private:
    286     ExecState* m_exec;
    287286    JSObject* m_targetCallee;
    288287    bool m_hasFoundFrame;
     
    293292static JSValue retrieveCallerFunction(ExecState* exec, JSFunction* functionObj)
    294293{
    295     RetrieveCallerFunctionFunctor functor(exec, functionObj);
     294    RetrieveCallerFunctionFunctor functor(functionObj);
    296295    exec->iterate(functor);
    297296    return functor.result();
     
    330329{
    331330    JSFunction* thisObject = jsCast<JSFunction*>(object);
    332     if (thisObject->isHostFunction())
     331    if (thisObject->isHostOrBuiltinFunction())
    333332        return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    334     if (thisObject->isBuiltinFunction()) {
    335         if (propertyName == exec->propertyNames().caller) {
    336             if (thisObject->jsExecutable()->isStrictMode()) {
    337                 bool result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    338                 if (!result) {
    339                     thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject()->throwTypeErrorGetterSetter(exec->vm()), DontDelete | DontEnum | Accessor);
    340                     result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    341                     ASSERT(result);
    342                 }
    343                 return result;
    344             }
    345             slot.setCacheableCustom(thisObject, ReadOnly | DontEnum | DontDelete, callerGetter);
    346             return true;
    347         }
    348         if (propertyName == exec->propertyNames().prototypeForHasInstancePrivateName) {
    349             PropertySlot boundFunctionSlot(thisObject);
    350             if (Base::getOwnPropertySlot(thisObject, exec, exec->propertyNames().boundFunctionPrivateName, boundFunctionSlot)) {
    351                 JSValue boundFunction = boundFunctionSlot.getValue(exec, exec->propertyNames().boundFunctionPrivateName);
    352                 PropertySlot boundPrototypeSlot(asObject(boundFunction));
    353                 if (asObject(boundFunction)->getPropertySlot(exec, propertyName, boundPrototypeSlot)) {
    354                     slot.setValue(boundPrototypeSlot.slotBase(), boundPrototypeSlot.attributes(), boundPrototypeSlot.getValue(exec, propertyName));
    355                     return true;
    356                 }
    357             }
    358         }
    359         if (propertyName == exec->propertyNames().name) {
    360             PropertySlot nameSlot(thisObject);
    361             if (Base::getOwnPropertySlot(thisObject, exec, exec->vm().propertyNames->boundFunctionNamePrivateName, nameSlot)) {
    362                 slot.setValue(thisObject, DontEnum | DontDelete | ReadOnly, nameSlot.getValue(exec, exec->vm().propertyNames->boundFunctionNamePrivateName));
    363                 return true;
    364             }
    365         }
    366         if (propertyName == exec->propertyNames().length) {
    367             PropertySlot lengthSlot(thisObject);
    368             if (Base::getOwnPropertySlot(thisObject, exec, exec->vm().propertyNames->boundFunctionLengthPrivateName, lengthSlot)) {
    369                 slot.setValue(thisObject, DontEnum | DontDelete | ReadOnly, lengthSlot.getValue(exec, exec->vm().propertyNames->boundFunctionLengthPrivateName));
    370                 return true;
    371             }
    372         }
    373            
    374         return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    375     }
    376    
    377     if (propertyName == exec->propertyNames().prototype || propertyName == exec->propertyNames().prototypeForHasInstancePrivateName) {
     333
     334    if (propertyName == exec->propertyNames().prototype) {
    378335        VM& vm = exec->vm();
    379336        unsigned attributes;
     
    382339            JSObject* prototype = constructEmptyObject(exec);
    383340            prototype->putDirect(vm, exec->propertyNames().constructor, thisObject, DontEnum);
    384             thisObject->putDirectPrototypeProperty(vm, prototype, DontDelete | DontEnum);
     341            thisObject->putDirect(vm, exec->propertyNames().prototype, prototype, DontDelete | DontEnum);
    385342            offset = thisObject->getDirectOffset(vm, exec->propertyNames().prototype, attributes);
    386343            ASSERT(isValidOffset(offset));
     
    434391{
    435392    JSFunction* thisObject = jsCast<JSFunction*>(object);
    436     if (mode == IncludeDontEnumProperties) {
    437         bool shouldIncludeJSFunctionProperties = !thisObject->isHostOrBuiltinFunction();
    438         if (!shouldIncludeJSFunctionProperties && thisObject->isBuiltinFunction()) {
    439             PropertySlot boundFunctionSlot(thisObject);
    440             shouldIncludeJSFunctionProperties = Base::getOwnPropertySlot(thisObject, exec, exec->propertyNames().boundFunctionPrivateName, boundFunctionSlot);
    441         }
    442         if (shouldIncludeJSFunctionProperties) {
    443             VM& vm = exec->vm();
    444             // Make sure prototype has been reified.
    445             PropertySlot slot(thisObject);
    446             thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, exec, vm.propertyNames->prototype, slot);
    447 
    448             propertyNames.add(vm.propertyNames->arguments);
    449             propertyNames.add(vm.propertyNames->caller);
    450             propertyNames.add(vm.propertyNames->length);
    451             propertyNames.add(vm.propertyNames->name);
    452         }
     393    if (!thisObject->isHostOrBuiltinFunction() && (mode == IncludeDontEnumProperties)) {
     394        VM& vm = exec->vm();
     395        // Make sure prototype has been reified.
     396        PropertySlot slot(thisObject);
     397        thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, exec, vm.propertyNames->prototype, slot);
     398
     399        propertyNames.add(vm.propertyNames->arguments);
     400        propertyNames.add(vm.propertyNames->caller);
     401        propertyNames.add(vm.propertyNames->length);
     402        propertyNames.add(vm.propertyNames->name);
    453403    }
    454404    Base::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
     
    470420        thisObject->m_allocationProfileWatchpoint.fireAll();
    471421        // Don't allow this to be cached, since a [[Put]] must clear m_allocationProfile.
    472         PutPropertySlot dontCachePrototype(thisObject);
    473         Base::put(thisObject, exec, propertyName, value, dontCachePrototype);
    474         PutPropertySlot dontCachePrototypeForHasInstance(thisObject);
    475         Base::put(thisObject, exec, exec->propertyNames().prototypeForHasInstancePrivateName, value, dontCachePrototypeForHasInstance);
     422        PutPropertySlot dontCache(thisObject);
     423        Base::put(thisObject, exec, propertyName, value, dontCache);
    476424        return;
    477425    }
     
    518466        thisObject->m_allocationProfile.clear();
    519467        thisObject->m_allocationProfileWatchpoint.fireAll();
    520         if (!Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException))
    521             return false;
    522         Base::defineOwnProperty(object, exec, exec->propertyNames().prototypeForHasInstancePrivateName, descriptor, throwException);
    523         return true;
     468        return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
    524469    }
    525470
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h

    r167199 r167313  
    4444{
    4545    Base::finishCreation(vm, name);
    46     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     46    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4747    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), DontEnum | DontDelete | ReadOnly);
    4848    putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r167199 r167313  
    6161#include "JSArrayBufferPrototype.h"
    6262#include "JSArrayIterator.h"
     63#include "JSBoundFunction.h"
    6364#include "JSCInlines.h"
    6465#include "JSCallbackConstructor.h"
     
    278279    m_functionPrototype.set(vm, this, FunctionPrototype::create(vm, FunctionPrototype::createStructure(vm, this, jsNull()))); // The real prototype will be set once ObjectPrototype is created.
    279280    m_functionStructure.set(vm, this, JSFunction::createStructure(vm, this, m_functionPrototype.get()));
     281    m_boundFunctionStructure.set(vm, this, JSBoundFunction::createStructure(vm, this, m_functionPrototype.get()));
    280282    m_namedFunctionStructure.set(vm, this, Structure::addPropertyTransition(vm, m_functionStructure.get(), vm.propertyNames->name, DontDelete | ReadOnly | DontEnum, 0, m_functionNameOffset));
    281283    m_internalFunctionStructure.set(vm, this, InternalFunction::createStructure(vm, this, m_functionPrototype.get()));
     
    452454   
    453455    JSFunction* builtinLog = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinLog);
    454     JSFunction* setTypeErrorAccessor = JSFunction::create(vm, this, 2, vm.propertyNames->emptyIdentifier.string(), globalFuncSetTypeErrorAccessor);
    455456    GlobalPropertyInfo staticGlobals[] = {
    456457        GlobalPropertyInfo(vm.propertyNames->NaN, jsNaN(), DontEnum | DontDelete | ReadOnly),
     
    460461        GlobalPropertyInfo(vm.propertyNames->ObjectPrivateName, objectConstructor, DontEnum | DontDelete | ReadOnly),
    461462        GlobalPropertyInfo(vm.propertyNames->TypeErrorPrivateName, m_typeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
    462         GlobalPropertyInfo(vm.propertyNames->BuiltinLogPrivateName, builtinLog, DontEnum | DontDelete | ReadOnly),
    463         GlobalPropertyInfo(vm.propertyNames->SetTypeErrorAccessorPrivateName, setTypeErrorAccessor, DontEnum | DontDelete | ReadOnly)
     463        GlobalPropertyInfo(vm.propertyNames->BuiltinLogPrivateName, builtinLog, DontEnum | DontDelete | ReadOnly)
    464464    };
    465465    addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r167199 r167313  
    2727
    2828#include "CallFrame.h"
    29 #include "GetterSetter.h"
    3029#include "Interpreter.h"
    3130#include "JSFunction.h"
     
    814813}
    815814
    816    
    817 EncodedJSValue JSC_HOST_CALL globalFuncSetTypeErrorAccessor(ExecState* exec)
    818 {
    819     JSObject* target = jsDynamicCast<JSObject*>(exec->argument(0));
    820     JSValue propertyName = exec->argument(1);
    821    
    822     // Setting __proto__ of a primitive should have no effect.
    823     if (!target || !propertyName.isString())
    824         return JSValue::encode(jsUndefined());
    825     VM& vm = exec->vm();
    826     Identifier property(exec, asString(propertyName)->getString(exec));
    827     target->putDirectNonIndexAccessor(vm, vm.propertyNames->arguments, target->globalObject()->throwTypeErrorGetterSetter(vm), DontDelete | DontEnum | Accessor);
    828     return JSValue::encode(jsUndefined());
    829 }
    830    
    831815} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h

    r167199 r167313  
    5454EncodedJSValue JSC_HOST_CALL globalFuncBuiltinLog(ExecState*);
    5555   
    56 EncodedJSValue JSC_HOST_CALL globalFuncSetTypeErrorAccessor(ExecState*);
    57    
    5856static const double mantissaOverflowLowerBound = 9007199254740992.0;
    5957double parseIntOverflow(const LChar*, unsigned length, int radix);
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r167199 r167313  
    26692669    return exec->vm().throwException(exec, createTypeError(exec, message));
    26702670}
    2671    
    2672 void JSObject::putDirectPrototypeProperty(VM& vm, JSValue value, int attributes)
    2673 {
    2674     putDirect(vm, vm.propertyNames->prototype, value, attributes);
    2675     putDirect(vm, vm.propertyNames->prototypeForHasInstancePrivateName, value, attributes);
    2676 }
    2677    
    2678 void JSObject::putDirectPrototypePropertyWithoutTransitions(VM& vm, JSValue value, int attributes)
    2679 {
    2680     putDirectWithoutTransition(vm, vm.propertyNames->prototype, value, attributes);
    2681     putDirectWithoutTransition(vm, vm.propertyNames->prototypeForHasInstancePrivateName, value, attributes);
    2682 }
    2683    
     2671
    26842672} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r167199 r167313  
    933933    }
    934934
    935     JS_EXPORT_PRIVATE void putDirectPrototypeProperty(VM&, JSValue, int);
    936     void putDirectPrototypePropertyWithoutTransitions(VM&, JSValue, int);
    937    
    938935private:
    939936    friend class LLIntOffsetsExtractor;
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r167199 r167313  
    8787{
    8888    Base::finishCreation(vm, "Promise");
    89     putDirectPrototypePropertyWithoutTransitions(vm, promisePrototype, DontEnum | DontDelete | ReadOnly);
     89    putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);
    9090    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    9191}
  • trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp

    r167199 r167313  
    4141{
    4242    Base::finishCreation(vm, mapPrototype->classInfo()->className);
    43     putDirectPrototypePropertyWithoutTransitions(vm, mapPrototype, DontEnum | DontDelete | ReadOnly);
     43    putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);
    4444    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4545}
  • trunk/Source/JavaScriptCore/runtime/MapIteratorConstructor.cpp

    r167199 r167313  
    4040{
    4141    Base::finishCreation(vm);
    42     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4343}
    4444
  • trunk/Source/JavaScriptCore/runtime/NameConstructor.cpp

    r167199 r167313  
    4545{
    4646    Base::finishCreation(vm, prototype->classInfo()->className);
    47     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     47    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4848    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
    4949}
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r167199 r167313  
    4747   
    4848    putDirect(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
    49     putDirectPrototypeProperty(vm, prototype, DontDelete | ReadOnly | DontEnum);
     49    putDirect(vm, vm.propertyNames->prototype, prototype, DontDelete | ReadOnly | DontEnum);
    5050    m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype));
    5151    ASSERT(m_errorStructure);
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp

    r167199 r167313  
    6767
    6868    // Number.Prototype
    69     putDirectPrototypePropertyWithoutTransitions(vm, numberPrototype, DontEnum | DontDelete | ReadOnly);
     69    putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
    7070
    7171    // no. of arguments for constructor
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r167199 r167313  
    8989    Base::finishCreation(vm, Identifier(&vm, "Object").string());
    9090    // ECMA 15.2.3.1
    91     putDirectPrototypePropertyWithoutTransitions(vm, objectPrototype, DontEnum | DontDelete | ReadOnly);
     91    putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
    9292    // no. of arguments for constructor
    9393    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r167199 r167313  
    9696
    9797    // ECMA 15.10.5.1 RegExp.prototype
    98     putDirectPrototypePropertyWithoutTransitions(vm, regExpPrototype, DontEnum | DontDelete | ReadOnly);
     98    putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
    9999
    100100    // no. of arguments for constructor
  • trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp

    r167199 r167313  
    4242{
    4343    Base::finishCreation(vm, setPrototype->classInfo()->className);
    44     putDirectPrototypePropertyWithoutTransitions(vm, setPrototype, DontEnum | DontDelete | ReadOnly);
     44    putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, DontEnum | DontDelete | ReadOnly);
    4545    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4646}
  • trunk/Source/JavaScriptCore/runtime/SetIteratorConstructor.cpp

    r167199 r167313  
    4040{
    4141    Base::finishCreation(vm);
    42     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4343}
    4444
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r167199 r167313  
    5757{
    5858    Base::finishCreation(vm, stringPrototype->classInfo()->className);
    59     putDirectPrototypePropertyWithoutTransitions(vm, stringPrototype, ReadOnly | DontEnum | DontDelete);
     59    putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
    6060    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6161}
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp

    r167199 r167313  
    4040{
    4141    Base::finishCreation(vm, prototype->classInfo()->className);
    42     putDirectPrototypePropertyWithoutTransitions(vm, prototype, DontEnum | DontDelete | ReadOnly);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    4343    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4444}
  • trunk/Source/WebCore/ChangeLog

    r167308 r167313  
     12014-04-15  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r167199 and r167251.
     4        https://bugs.webkit.org/show_bug.cgi?id=131678
     5
     6        Caused a DYEBench regression and does not seem to improve perf
     7        on relevant websites (Requested by rniwa on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Rewrite Function.bind as a builtin"
     12        https://bugs.webkit.org/show_bug.cgi?id=131083
     13        http://trac.webkit.org/changeset/167199
     14
     15        "Update test result"
     16        http://trac.webkit.org/changeset/167251
     17
    1182014-04-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    219
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp

    r167199 r167313  
    11/*
    22 *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
    3  *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2014 Apple Inc. All rights reserved.
     3 *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
    44 *
    55 *  This library is free software; you can redistribute it and/or
     
    4444    Base::finishCreation(globalObject);
    4545    ASSERT(inherits(info()));
    46     putDirectPrototypeProperty(vm, JSHTMLImageElementPrototype::self(vm, globalObject), None);
     46    putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElementPrototype::self(vm, globalObject), None);
    4747}
    4848
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r167244 r167313  
    45274527        push(@$outputArray, "    Base::finishCreation(vm);\n");
    45284528        push(@$outputArray, "    ASSERT(inherits(info()));\n");
    4529         push(@$outputArray, "    putDirectPrototypeProperty(vm, globalObject->prototype(), DontDelete | ReadOnly);\n");
     4529        push(@$outputArray, "    putDirect(vm, vm.propertyNames->prototype, globalObject->prototype(), DontDelete | ReadOnly);\n");
    45304530    } elsif ($generatingNamedConstructor) {
    45314531        push(@$outputArray, "    Base::finishCreation(globalObject);\n");
    45324532        push(@$outputArray, "    ASSERT(inherits(info()));\n");
    4533         push(@$outputArray, "    putDirectPrototypeProperty(vm, ${className}Prototype::self(vm, globalObject), None);\n");
     4533        push(@$outputArray, "    putDirect(vm, vm.propertyNames->prototype, ${className}Prototype::self(vm, globalObject), None);\n");
    45344534    } else {
    45354535        push(@$outputArray, "    Base::finishCreation(vm);\n");
    45364536        push(@$outputArray, "    ASSERT(inherits(info()));\n");
    4537         push(@$outputArray, "    putDirectPrototypeProperty(vm, ${protoClassName}::self(vm, globalObject), DontDelete | ReadOnly);\n");
     4537        push(@$outputArray, "    putDirect(vm, vm.propertyNames->prototype, ${protoClassName}::self(vm, globalObject), DontDelete | ReadOnly);\n");
    45384538    }
    45394539    push(@$outputArray, "    putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), ReadOnly | DontDelete | DontEnum);\n") if defined $leastConstructorLength;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r167199 r167313  
    7575    Base::finishCreation(vm);
    7676    ASSERT(inherits(info()));
    77     putDirectPrototypeProperty(vm, JSTestActiveDOMObjectPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     77    putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObjectPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    7878    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    7979}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r167199 r167313  
    7171    Base::finishCreation(vm);
    7272    ASSERT(inherits(info()));
    73     putDirectPrototypeProperty(vm, JSTestCustomNamedGetterPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     73    putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetterPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    7474    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    7575}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r167199 r167313  
    9696    Base::finishCreation(vm);
    9797    ASSERT(inherits(info()));
    98     putDirectPrototypeProperty(vm, JSTestEventConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     98    putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    9999    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    100100}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r167199 r167313  
    7777    Base::finishCreation(vm);
    7878    ASSERT(inherits(info()));
    79     putDirectPrototypeProperty(vm, JSTestEventTargetPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     79    putDirect(vm, vm.propertyNames->prototype, JSTestEventTargetPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    8080    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    8181}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r167199 r167313  
    7070    Base::finishCreation(vm);
    7171    ASSERT(inherits(info()));
    72     putDirectPrototypeProperty(vm, JSTestExceptionPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     72    putDirect(vm, vm.propertyNames->prototype, JSTestExceptionPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    7373    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    7474}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp

    r167199 r167313  
    5353    Base::finishCreation(vm);
    5454    ASSERT(inherits(info()));
    55     putDirectPrototypeProperty(vm, JSTestGenerateIsReachablePrototype::self(vm, globalObject), DontDelete | ReadOnly);
     55    putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachablePrototype::self(vm, globalObject), DontDelete | ReadOnly);
    5656    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    5757}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r167199 r167313  
    194194    Base::finishCreation(vm);
    195195    ASSERT(inherits(info()));
    196     putDirectPrototypeProperty(vm, JSTestInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
     196    putDirect(vm, vm.propertyNames->prototype, JSTestInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
    197197    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    198198}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r167199 r167313  
    5757    Base::finishCreation(vm);
    5858    ASSERT(inherits(info()));
    59     putDirectPrototypeProperty(vm, JSTestMediaQueryListListenerPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     59    putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListenerPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    6060    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6161}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r167199 r167313  
    5656    Base::finishCreation(vm);
    5757    ASSERT(inherits(info()));
    58     putDirectPrototypeProperty(vm, JSTestNamedConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     58    putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    5959    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6060}
     
    9999    Base::finishCreation(globalObject);
    100100    ASSERT(inherits(info()));
    101     putDirectPrototypeProperty(vm, JSTestNamedConstructorPrototype::self(vm, globalObject), None);
     101    putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructorPrototype::self(vm, globalObject), None);
    102102    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    103103}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r167199 r167313  
    6363    Base::finishCreation(vm);
    6464    ASSERT(inherits(info()));
    65     putDirectPrototypeProperty(vm, JSTestNodePrototype::self(vm, globalObject), DontDelete | ReadOnly);
     65    putDirect(vm, vm.propertyNames->prototype, JSTestNodePrototype::self(vm, globalObject), DontDelete | ReadOnly);
    6666    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6767}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r167251 r167313  
    6565    Base::finishCreation(vm);
    6666    ASSERT(inherits(info()));
    67     putDirectPrototypeProperty(vm, JSTestNondeterministicPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     67    putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministicPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    6868    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6969}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r167199 r167313  
    243243    Base::finishCreation(vm);
    244244    ASSERT(inherits(info()));
    245     putDirectPrototypeProperty(vm, JSTestObjPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     245    putDirect(vm, vm.propertyNames->prototype, JSTestObjPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    246246    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    247247}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r167199 r167313  
    122122    Base::finishCreation(vm);
    123123    ASSERT(inherits(info()));
    124     putDirectPrototypeProperty(vm, JSTestOverloadedConstructorsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     124    putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructorsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    125125    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    126126}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r167199 r167313  
    6161    Base::finishCreation(vm);
    6262    ASSERT(inherits(info()));
    63     putDirectPrototypeProperty(vm, JSTestSerializedScriptValueInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
     63    putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
    6464    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6565}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r167199 r167313  
    9898    Base::finishCreation(vm);
    9999    ASSERT(inherits(info()));
    100     putDirectPrototypeProperty(vm, JSTestTypedefsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     100    putDirect(vm, vm.propertyNames->prototype, JSTestTypedefsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    101101    putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
    102102}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp

    r167199 r167313  
    5656    Base::finishCreation(vm);
    5757    ASSERT(inherits(info()));
    58     putDirectPrototypeProperty(vm, JSattributePrototype::self(vm, globalObject), DontDelete | ReadOnly);
     58    putDirect(vm, vm.propertyNames->prototype, JSattributePrototype::self(vm, globalObject), DontDelete | ReadOnly);
    5959    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    6060}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp

    r167199 r167313  
    5353    Base::finishCreation(vm);
    5454    ASSERT(inherits(info()));
    55     putDirectPrototypeProperty(vm, JSreadonlyPrototype::self(vm, globalObject), DontDelete | ReadOnly);
     55    putDirect(vm, vm.propertyNames->prototype, JSreadonlyPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    5656    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
    5757}
Note: See TracChangeset for help on using the changeset viewer.