Title: [199108] trunk/Source/_javascript_Core
Revision
199108
Author
[email protected]
Date
2016-04-06 11:49:54 -0700 (Wed, 06 Apr 2016)

Log Message

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

Still breaks internal builds (Requested by keith_miller on
#webkit).

Reverted changeset:

"We should support the ability to do a non-effectful getById"
https://bugs.webkit.org/show_bug.cgi?id=156116
http://trac.webkit.org/changeset/199104

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (199107 => 199108)


--- trunk/Source/_javascript_Core/ChangeLog	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-06 18:49:54 UTC (rev 199108)
@@ -1,3 +1,17 @@
+2016-04-06  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r199104.
+        https://bugs.webkit.org/show_bug.cgi?id=156301
+
+        Still breaks internal builds (Requested by keith_miller on
+        #webkit).
+
+        Reverted changeset:
+
+        "We should support the ability to do a non-effectful getById"
+        https://bugs.webkit.org/show_bug.cgi?id=156116
+        http://trac.webkit.org/changeset/199104
+
 2016-04-06  Keith Miller  <[email protected]>
 
         RegExp constructor should use Symbol.match and other properties

Modified: trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/builtins/BuiltinExecutables.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -35,6 +35,8 @@
 
 namespace JSC {
 
+static UnlinkedFunctionExecutable* createExecutableInternal(VM&, const SourceCode&, const Identifier&, ConstructorKind, ConstructAbility);
+
 BuiltinExecutables::BuiltinExecutables(VM& vm)
     : m_vm(vm)
 #define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(makeSource(StringImpl::createFromLiteral(s_##name, length)))
@@ -52,9 +54,9 @@
     case ConstructorKind::None:
         break;
     case ConstructorKind::Base:
-        return createExecutable(m_vm, makeSource(baseConstructorCode), name, constructorKind, ConstructAbility::CanConstruct);
+        return createExecutableInternal(m_vm, makeSource(baseConstructorCode), name, constructorKind, ConstructAbility::CanConstruct);
     case ConstructorKind::Derived:
-        return createExecutable(m_vm, makeSource(derivedConstructorCode), name, constructorKind, ConstructAbility::CanConstruct);
+        return createExecutableInternal(m_vm, makeSource(derivedConstructorCode), name, constructorKind, ConstructAbility::CanConstruct);
     }
     ASSERT_NOT_REACHED();
     return nullptr;
@@ -62,15 +64,15 @@
 
 UnlinkedFunctionExecutable* BuiltinExecutables::createBuiltinExecutable(const SourceCode& code, const Identifier& name, ConstructAbility constructAbility)
 {
-    return createExecutable(m_vm, code, name, ConstructorKind::None, constructAbility);
+    return createExecutableInternal(m_vm, code, name, ConstructorKind::None, constructAbility);
 }
 
 UnlinkedFunctionExecutable* createBuiltinExecutable(VM& vm, const SourceCode& code, const Identifier& name, ConstructAbility constructAbility)
 {
-    return BuiltinExecutables::createExecutable(vm, code, name, ConstructorKind::None, constructAbility);
+    return createExecutableInternal(vm, code, name, ConstructorKind::None, constructAbility);
 }
 
-UnlinkedFunctionExecutable* BuiltinExecutables::createExecutable(VM& vm, const SourceCode& source, const Identifier& name, ConstructorKind constructorKind, ConstructAbility constructAbility)
+UnlinkedFunctionExecutable* createExecutableInternal(VM& vm, const SourceCode& source, const Identifier& name, ConstructorKind constructorKind, ConstructAbility constructAbility)
 {
     JSTextPosition positionBeforeLastNewline;
     ParserError error;

Modified: trunk/Source/_javascript_Core/builtins/BuiltinExecutables.h (199107 => 199108)


--- trunk/Source/_javascript_Core/builtins/BuiltinExecutables.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/builtins/BuiltinExecutables.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -52,7 +52,6 @@
 
     UnlinkedFunctionExecutable* createDefaultConstructor(ConstructorKind, const Identifier& name);
 
-    JS_EXPORT_PRIVATE static UnlinkedFunctionExecutable* createExecutable(VM&, const SourceCode&, const Identifier&, ConstructorKind, ConstructAbility);
 private:
     void finalize(Handle<Unknown>, void* context) override;
 

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeIntrinsicRegistry.h (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/BytecodeIntrinsicRegistry.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeIntrinsicRegistry.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -41,7 +41,6 @@
 #define JSC_COMMON_BYTECODE_INTRINSIC_FUNCTIONS_EACH_NAME(macro) \
     macro(assert) \
     macro(isObject) \
-    macro(tryGetById) \
     macro(putByValDirect) \
     macro(toString)
 

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeList.json (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/BytecodeList.json	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeList.json	2016-04-06 18:49:54 UTC (rev 199108)
@@ -57,7 +57,6 @@
             { "name" : "op_is_object_or_null", "length" : 3 },
             { "name" : "op_is_function", "length" : 3 },
             { "name" : "op_in", "length" : 4 },
-            { "name" : "op_try_get_by_id", "length" : 4 },
             { "name" : "op_get_by_id", "length" : 9  },
             { "name" : "op_get_array_length", "length" : 9 },
             { "name" : "op_put_by_id", "length" : 9 },

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -143,7 +143,6 @@
     case op_resolve_scope:
     case op_get_from_scope:
     case op_to_primitive:
-    case op_try_get_by_id:
     case op_get_by_id:
     case op_get_array_length:
     case op_typeof:
@@ -368,7 +367,6 @@
     case op_tail_call:
     case op_call_eval:
     case op_construct:
-    case op_try_get_by_id:
     case op_get_by_id:
     case op_get_array_length:
     case op_overrides_has_instance:

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -1095,14 +1095,6 @@
             printBinaryOp(out, exec, location, it, "in");
             break;
         }
-        case op_try_get_by_id: {
-            int r0 = (++it)->u.operand;
-            int r1 = (++it)->u.operand;
-            int id0 = (++it)->u.operand;
-            printLocationAndOp(out, exec, location, it, "try_get_by_id");
-            out.printf("%s, %s, %s", registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data());
-            break;
-        }
         case op_get_by_id:
         case op_get_array_length: {
             printGetByIdOp(out, exec, location, it);

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -159,26 +159,6 @@
 {
 }
 
-std::unique_ptr<AccessCase> AccessCase::tryGet(
-    VM& vm, JSCell* owner, AccessType type, PropertyOffset offset, Structure* structure,
-    const ObjectPropertyConditionSet& conditionSet, bool viaProxy, WatchpointSet* additionalSet)
-{
-    std::unique_ptr<AccessCase> result(new AccessCase());
-
-    result->m_type = type;
-    result->m_offset = offset;
-    result->m_structure.set(vm, owner, structure);
-    result->m_conditionSet = conditionSet;
-
-    if (viaProxy || additionalSet) {
-        result->m_rareData = std::make_unique<RareData>();
-        result->m_rareData->viaProxy = viaProxy;
-        result->m_rareData->additionalSet = additionalSet;
-    }
-
-    return result;
-}
-
 std::unique_ptr<AccessCase> AccessCase::get(
     VM& vm, JSCell* owner, AccessType type, PropertyOffset offset, Structure* structure,
     const ObjectPropertyConditionSet& conditionSet, bool viaProxy, WatchpointSet* additionalSet,
@@ -705,7 +685,6 @@
         return;
 
     case Load:
-    case GetGetter:
     case Getter:
     case Setter:
     case CustomValueGetter:
@@ -741,7 +720,7 @@
 
         GPRReg loadedValueGPR = InvalidGPRReg;
         if (m_type != CustomValueGetter && m_type != CustomAccessorGetter && m_type != CustomValueSetter && m_type != CustomAccessorSetter) {
-            if (m_type == Load || m_type == GetGetter)
+            if (m_type == Load)
                 loadedValueGPR = valueRegs.payloadGPR();
             else
                 loadedValueGPR = scratchGPR;
@@ -760,7 +739,7 @@
             jit.load64(
                 CCallHelpers::Address(storageGPR, offsetRelativeToBase(m_offset)), loadedValueGPR);
 #else
-            if (m_type == Load || m_type == GetGetter) {
+            if (m_type == Load) {
                 jit.load32(
                     CCallHelpers::Address(storageGPR, offsetRelativeToBase(m_offset) + TagOffset),
                     valueRegs.tagGPR());
@@ -771,7 +750,7 @@
 #endif
         }
 
-        if (m_type == Load || m_type == GetGetter) {
+        if (m_type == Load) {
             state.succeed();
             return;
         }
@@ -1642,9 +1621,6 @@
     case AccessCase::Miss:
         out.print("Miss");
         return;
-    case AccessCase::GetGetter:
-        out.print("GetGetter");
-        return;
     case AccessCase::Getter:
         out.print("Getter");
         return;

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -57,7 +57,6 @@
         Transition,
         Replace,
         Miss,
-        GetGetter,
         Getter,
         Setter,
         CustomValueGetter,
@@ -71,12 +70,78 @@
         StringLength
     };
 
-    static std::unique_ptr<AccessCase> tryGet(
-        VM&, JSCell* owner, AccessType, PropertyOffset, Structure*,
-        const ObjectPropertyConditionSet& = ObjectPropertyConditionSet(),
-        bool viaProxy = false,
-        WatchpointSet* additionalSet = nullptr);
+    static bool isGet(AccessType type)
+    {
+        switch (type) {
+        case Transition:
+        case Replace:
+        case Setter:
+        case CustomValueSetter:
+        case CustomAccessorSetter:
+        case InHit:
+        case InMiss:
+            return false;
+        case Load:
+        case MegamorphicLoad:
+        case Miss:
+        case Getter:
+        case CustomValueGetter:
+        case CustomAccessorGetter:
+        case IntrinsicGetter:
+        case ArrayLength:
+        case StringLength:
+            return true;
+        }
+    }
 
+    static bool isPut(AccessType type)
+    {
+        switch (type) {
+        case Load:
+        case MegamorphicLoad:
+        case Miss:
+        case Getter:
+        case CustomValueGetter:
+        case CustomAccessorGetter:
+        case IntrinsicGetter:
+        case InHit:
+        case InMiss:
+        case ArrayLength:
+        case StringLength:
+            return false;
+        case Transition:
+        case Replace:
+        case Setter:
+        case CustomValueSetter:
+        case CustomAccessorSetter:
+            return true;
+        }
+    }
+
+    static bool isIn(AccessType type)
+    {
+        switch (type) {
+        case Load:
+        case MegamorphicLoad:
+        case Miss:
+        case Getter:
+        case CustomValueGetter:
+        case CustomAccessorGetter:
+        case IntrinsicGetter:
+        case Transition:
+        case Replace:
+        case Setter:
+        case CustomValueSetter:
+        case CustomAccessorSetter:
+        case ArrayLength:
+        case StringLength:
+            return false;
+        case InHit:
+        case InMiss:
+            return true;
+        }
+    }
+
     static std::unique_ptr<AccessCase> get(
         VM&, JSCell* owner, AccessType, PropertyOffset, Structure*,
         const ObjectPropertyConditionSet& = ObjectPropertyConditionSet(),

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -148,11 +148,8 @@
     }
 
     switch (accessType) {
-    case AccessType::GetPure:
-        resetGetByID(codeBlock, *this, GetByIDKind::Pure);
-        break;
     case AccessType::Get:
-        resetGetByID(codeBlock, *this, GetByIDKind::Normal);
+        resetGetByID(codeBlock, *this);
         break;
     case AccessType::Put:
         resetPutByID(codeBlock, *this);

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -47,7 +47,6 @@
 
 enum class AccessType : int8_t {
     Get,
-    GetPure,
     Put,
     In
 };

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -2360,17 +2360,6 @@
     return dst;
 }
 
-RegisterID* BytecodeGenerator::emitTryGetById(RegisterID* dst, RegisterID* base, const Identifier& property)
-{
-    ASSERT_WITH_MESSAGE(!parseIndex(property), "Indexed properties are not supported with tryGetById.");
-
-    emitOpcode(op_try_get_by_id);
-    instructions().append(kill(dst));
-    instructions().append(base->index());
-    instructions().append(addConstant(property));
-    return dst;
-}
-
 RegisterID* BytecodeGenerator::emitGetById(RegisterID* dst, RegisterID* base, const Identifier& property)
 {
     ASSERT_WITH_MESSAGE(!parseIndex(property), "Indexed properties should be handled with get_by_val.");

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -540,7 +540,6 @@
         RegisterID* emitTypeOf(RegisterID* dst, RegisterID* src) { return emitUnaryOp(op_typeof, dst, src); }
         RegisterID* emitIn(RegisterID* dst, RegisterID* property, RegisterID* base) { return emitBinaryOp(op_in, dst, property, base, OperandTypes()); }
 
-        RegisterID* emitTryGetById(RegisterID* dst, RegisterID* base, const Identifier& property);
         RegisterID* emitGetById(RegisterID* dst, RegisterID* base, const Identifier& property);
         RegisterID* emitPutById(RegisterID* base, const Identifier& property, RegisterID* value);
         RegisterID* emitDirectPutById(RegisterID* base, const Identifier& property, RegisterID* value, PropertyNode::PutType);

Modified: trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -842,21 +842,6 @@
     return generator.moveToDestinationIfNeeded(dst, generator.emitDirectPutByVal(base.get(), index.get(), value.get()));
 }
 
-RegisterID* BytecodeIntrinsicNode::emit_intrinsic_tryGetById(BytecodeGenerator& generator, RegisterID* dst)
-{
-    ArgumentListNode* node = m_args->m_listNode;
-    RefPtr<RegisterID> base = generator.emitNode(node);
-    node = node->m_next;
-
-    // Since this is a builtin we expect the creator to use a string literal as the second argument.
-    ASSERT(node->m_expr->isString());
-    const Identifier& ident = static_cast<StringNode*>(node->m_expr)->value();
-    ASSERT(!node->m_next);
-
-    RegisterID* finalDest = generator.finalDestination(dst);
-    return generator.emitTryGetById(finalDest, base.get(), ident);
-}
-
 RegisterID* BytecodeIntrinsicNode::emit_intrinsic_toString(BytecodeGenerator& generator, RegisterID* dst)
 {
     ArgumentListNode* node = m_args->m_listNode;

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -194,7 +194,7 @@
     JITGetByIdGenerator gen(
         m_jit.codeBlock(), codeOrigin, callSite, usedRegisters,
         JSValueRegs(baseTagGPROrNone, basePayloadGPR),
-        JSValueRegs(resultTagGPR, resultPayloadGPR), AccessType::Get);
+        JSValueRegs(resultTagGPR, resultPayloadGPR));
     
     gen.generateFastPath(m_jit);
     

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -164,7 +164,7 @@
     }
     JITGetByIdGenerator gen(
         m_jit.codeBlock(), codeOrigin, callSite, usedRegisters, JSValueRegs(baseGPR),
-        JSValueRegs(resultGPR), AccessType::Get);
+        JSValueRegs(resultGPR));
     gen.generateFastPath(m_jit);
     
     JITCompiler::JumpList slowCases;

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -7331,7 +7331,7 @@
                 auto generator = Box<JITGetByIdGenerator>::create(
                     jit.codeBlock(), node->origin.semantic, callSiteIndex,
                     params.unavailableRegisters(), JSValueRegs(params[1].gpr()),
-                    JSValueRegs(params[0].gpr()), AccessType::Get);
+                    JSValueRegs(params[0].gpr()));
 
                 generator->generateFastPath(jit);
                 CCallHelpers::Label done = jit.label();

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -228,7 +228,6 @@
         DEFINE_OP(op_get_scope)
         DEFINE_OP(op_eq)
         DEFINE_OP(op_eq_null)
-        DEFINE_OP(op_try_get_by_id)
         case op_get_array_length:
         DEFINE_OP(op_get_by_id)
         DEFINE_OP(op_get_by_val)
@@ -407,7 +406,6 @@
         DEFINE_SLOWCASE_OP(op_create_this)
         DEFINE_SLOWCASE_OP(op_div)
         DEFINE_SLOWCASE_OP(op_eq)
-        DEFINE_SLOWCASE_OP(op_try_get_by_id)
         case op_get_array_length:
         DEFINE_SLOWCASE_OP(op_get_by_id)
         DEFINE_SLOWCASE_OP(op_get_by_val)

Modified: trunk/Source/_javascript_Core/jit/JIT.h (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JIT.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -502,7 +502,6 @@
         void emit_op_get_scope(Instruction*);
         void emit_op_eq(Instruction*);
         void emit_op_eq_null(Instruction*);
-        void emit_op_try_get_by_id(Instruction*);
         void emit_op_get_by_id(Instruction*);
         void emit_op_get_arguments_length(Instruction*);
         void emit_op_get_by_val(Instruction*);
@@ -615,7 +614,6 @@
         void emitSlow_op_div(Instruction*, Vector<SlowCaseEntry>::iterator&);
         void emitSlow_op_eq(Instruction*, Vector<SlowCaseEntry>::iterator&);
         void emitSlow_op_get_callee(Instruction*, Vector<SlowCaseEntry>::iterator&);
-        void emitSlow_op_try_get_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&);
         void emitSlow_op_get_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&);
         void emitSlow_op_get_arguments_length(Instruction*, Vector<SlowCaseEntry>::iterator&);
         void emitSlow_op_get_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&);
@@ -740,10 +738,8 @@
         MacroAssembler::Call callOperation(V_JITOperation_EC, JSCell*);
         MacroAssembler::Call callOperation(J_JITOperation_EJ, int, GPRReg);
 #if USE(JSVALUE64)
-        MacroAssembler::Call callOperation(J_JITOperation_ESsiJI, int, StructureStubInfo*, GPRReg, UniquedStringImpl*);
         MacroAssembler::Call callOperation(WithProfileTag, J_JITOperation_ESsiJI, int, StructureStubInfo*, GPRReg, UniquedStringImpl*);
 #else
-        MacroAssembler::Call callOperation(J_JITOperation_ESsiJI, int, StructureStubInfo*, GPRReg, GPRReg, UniquedStringImpl*);
         MacroAssembler::Call callOperation(WithProfileTag, J_JITOperation_ESsiJI, int, StructureStubInfo*, GPRReg, GPRReg, UniquedStringImpl*);
 #endif
         MacroAssembler::Call callOperation(J_JITOperation_EJIdc, int, GPRReg, const Identifier*);

Modified: trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -104,9 +104,9 @@
 
 JITGetByIdGenerator::JITGetByIdGenerator(
     CodeBlock* codeBlock, CodeOrigin codeOrigin, CallSiteIndex callSite, const RegisterSet& usedRegisters,
-    JSValueRegs base, JSValueRegs value, AccessType accessType)
+    JSValueRegs base, JSValueRegs value)
     : JITByIdGenerator(
-        codeBlock, codeOrigin, callSite, accessType, usedRegisters, base, value)
+        codeBlock, codeOrigin, callSite, AccessType::Get, usedRegisters, base, value)
 {
     RELEASE_ASSERT(base.payloadGPR() != value.tagGPR());
 }

Modified: trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -96,7 +96,7 @@
 
     JITGetByIdGenerator(
         CodeBlock*, CodeOrigin, CallSiteIndex, const RegisterSet& usedRegisters, JSValueRegs base,
-        JSValueRegs value, AccessType);
+        JSValueRegs value);
     
     void generateFastPath(MacroAssembler&);
 };

Modified: trunk/Source/_javascript_Core/jit/JITInlines.h (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITInlines.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITInlines.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -459,12 +459,6 @@
     return appendCallWithExceptionCheck(operation);
 }
 
-ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1, UniquedStringImpl* uid)
-{
-    setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
-    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
-}
-
 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1, UniquedStringImpl* uid)
 {
     setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1, TrustedImmPtr(uid));
@@ -648,12 +642,6 @@
     return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
 }
 
-ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1Tag, GPRReg arg1Payload, UniquedStringImpl* uid)
-{
-    setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, arg1Tag, TrustedImmPtr(uid));
-    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
-}
-
 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1Tag, GPRReg arg1Payload, UniquedStringImpl* uid)
 {
     setupArgumentsWithExecState(TrustedImmPtr(stubInfo), arg1Payload, arg1Tag, TrustedImmPtr(uid));

Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITOperations.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -154,36 +154,6 @@
     return missingArgCount;
 }
 
-EncodedJSValue JIT_OPERATION operationTryGetById(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)
-{
-    VM* vm = &exec->vm();
-    NativeCallFrameTracer tracer(vm, exec);
-    Identifier ident = Identifier::fromUid(vm, uid);
-    stubInfo->tookSlowPath = true;
-
-    JSValue baseValue = JSValue::decode(base);
-    PropertySlot slot(baseValue, PropertySlot::InternalMethodType::VMInquiry);
-    baseValue.getPropertySlot(exec, ident, slot);
-
-    return JSValue::encode(slot.getPureResult());
-}
-
-EncodedJSValue JIT_OPERATION operationTryGetByIdOptimize(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)
-{
-    VM* vm = &exec->vm();
-    NativeCallFrameTracer tracer(vm, exec);
-    Identifier ident = Identifier::fromUid(vm, uid);
-
-    JSValue baseValue = JSValue::decode(base);
-    PropertySlot slot(baseValue, PropertySlot::InternalMethodType::VMInquiry);
-
-    baseValue.getPropertySlot(exec, ident, slot);
-    if (stubInfo->considerCaching() && !slot.isTaintedByProxy() && (slot.isCacheableValue() || slot.isCacheableGetter() || slot.isUnset()))
-        repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind::Pure);
-
-    return JSValue::encode(slot.getPureResult());
-}
-
 EncodedJSValue JIT_OPERATION operationGetById(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)
 {
     VM* vm = &exec->vm();
@@ -219,7 +189,7 @@
     
     bool hasResult = baseValue.getPropertySlot(exec, ident, slot);
     if (stubInfo->considerCaching())
-        repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind::Normal);
+        repatchGetByID(exec, baseValue, ident, slot, *stubInfo);
     
     return JSValue::encode(hasResult? slot.getValue(exec, ident) : jsUndefined());
 }

Modified: trunk/Source/_javascript_Core/jit/JITOperations.h (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITOperations.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITOperations.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -287,10 +287,9 @@
 #endif
 int32_t JIT_OPERATION operationCallArityCheck(ExecState*) WTF_INTERNAL;
 int32_t JIT_OPERATION operationConstructArityCheck(ExecState*) WTF_INTERNAL;
-EncodedJSValue JIT_OPERATION operationTryGetById(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
-EncodedJSValue JIT_OPERATION operationTryGetByIdOptimize(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationGetById(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationGetByIdGeneric(ExecState*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
+EncodedJSValue JIT_OPERATION operationGetByIdBuildList(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationGetByIdOptimize(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationInOptimize(ExecState*, StructureStubInfo*, JSCell*, UniquedStringImpl*) WTF_INTERNAL;
 EncodedJSValue JIT_OPERATION operationIn(ExecState*, StructureStubInfo*, JSCell*, UniquedStringImpl*) WTF_INTERNAL;

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -213,7 +213,7 @@
 
     JITGetByIdGenerator gen(
         m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(m_bytecodeOffset), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs(regT0), JSValueRegs(regT0), AccessType::Get);
+        JSValueRegs(regT0), JSValueRegs(regT0));
     gen.generateFastPath(*this);
 
     fastDoneCase = jump();
@@ -531,43 +531,6 @@
     callOperation(operationDeleteById, dst, regT0, &m_codeBlock->identifier(property));
 }
 
-void JIT::emit_op_try_get_by_id(Instruction* currentInstruction)
-{
-    int resultVReg = currentInstruction[1].u.operand;
-    int baseVReg = currentInstruction[2].u.operand;
-
-    emitGetVirtualRegister(baseVReg, regT0);
-
-    emitJumpSlowCaseIfNotJSCell(regT0, baseVReg);
-
-    JITGetByIdGenerator gen(
-        m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(m_bytecodeOffset), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs(regT0), JSValueRegs(regT0), AccessType::GetPure);
-    gen.generateFastPath(*this);
-    addSlowCase(gen.slowPathJump());
-    m_getByIds.append(gen);
-    
-    emitPutVirtualRegister(resultVReg);
-}
-
-void JIT::emitSlow_op_try_get_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
-    int resultVReg = currentInstruction[1].u.operand;
-    int baseVReg = currentInstruction[2].u.operand;
-    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
-
-    linkSlowCaseIfNotJSCell(iter, baseVReg);
-    linkSlowCase(iter);
-
-    JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++];
-
-    Label coldPathBegin = label();
-
-    Call call = callOperation(operationTryGetByIdOptimize, resultVReg, gen.stubInfo(), regT0, ident->impl());
-    
-    gen.reportSlowPathCall(coldPathBegin, call);
-}
-
 void JIT::emit_op_get_by_id(Instruction* currentInstruction)
 {
     int resultVReg = currentInstruction[1].u.operand;
@@ -583,7 +546,7 @@
 
     JITGetByIdGenerator gen(
         m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(m_bytecodeOffset), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs(regT0), JSValueRegs(regT0), AccessType::Get);
+        JSValueRegs(regT0), JSValueRegs(regT0));
     gen.generateFastPath(*this);
     addSlowCase(gen.slowPathJump());
     m_getByIds.append(gen);

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -282,7 +282,7 @@
 
     JITGetByIdGenerator gen(
         m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(currentInstruction), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0), AccessType::Get);
+        JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0));
     gen.generateFastPath(*this);
 
     fastDoneCase = jump();
@@ -573,43 +573,6 @@
     m_byValInstructionIndex++;
 }
 
-void JIT::emit_op_try_get_by_id(Instruction* currentInstruction)
-{
-    int dst = currentInstruction[1].u.operand;
-    int base = currentInstruction[2].u.operand;
-
-    emitLoad(base, regT1, regT0);
-    emitJumpSlowCaseIfNotJSCell(base, regT1);
-
-    JITGetByIdGenerator gen(
-        m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(currentInstruction), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0), AccessType::GetPure);
-    gen.generateFastPath(*this);
-    addSlowCase(gen.slowPathJump());
-    m_getByIds.append(gen);
-    
-    emitStore(dst, regT1, regT0);
-}
-
-void JIT::emitSlow_op_try_get_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
-    int resultVReg = currentInstruction[1].u.operand;
-    int baseVReg = currentInstruction[2].u.operand;
-    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
-
-    linkSlowCaseIfNotJSCell(iter, baseVReg);
-    linkSlowCase(iter);
-
-    JITGetByIdGenerator& gen = m_getByIds[m_getByIdIndex++];
-
-    Label coldPathBegin = label();
-
-    Call call = callOperation(operationTryGetByIdOptimize, resultVReg, gen.stubInfo(), regT1, regT0, ident->impl());
-    
-    gen.reportSlowPathCall(coldPathBegin, call);
-}
-
-
 void JIT::emit_op_get_by_id(Instruction* currentInstruction)
 {
     int dst = currentInstruction[1].u.operand;
@@ -624,7 +587,7 @@
 
     JITGetByIdGenerator gen(
         m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(currentInstruction), RegisterSet::stubUnavailableRegisters(),
-        JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0), AccessType::Get);
+        JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0));
     gen.generateFastPath(*this);
     addSlowCase(gen.slowPathJump());
     m_getByIds.append(gen);

Modified: trunk/Source/_javascript_Core/jit/Repatch.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/Repatch.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/Repatch.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -93,7 +93,7 @@
 
 static void repatchByIdSelfAccess(
     CodeBlock* codeBlock, StructureStubInfo& stubInfo, Structure* structure,
-    PropertyOffset offset, const FunctionPtr& slowPathFunction,
+    PropertyOffset offset, const FunctionPtr &slowPathFunction,
     bool compact)
 {
     // Only optimize once!
@@ -213,22 +213,8 @@
     return Options::forceICFailure();
 }
 
-inline J_JITOperation_ESsiJI appropriateOptimizingGetByIdFunction(GetByIDKind kind)
+static InlineCacheAction tryCacheGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
 {
-    if (kind == GetByIDKind::Normal)
-        return operationGetByIdOptimize;
-    return operationTryGetByIdOptimize;
-}
-
-inline J_JITOperation_ESsiJI appropriateGenericGetByIdFunction(GetByIDKind kind)
-{
-    if (kind == GetByIDKind::Normal)
-        return operationGetById;
-    return operationTryGetById;
-}
-
-static InlineCacheAction tryCacheGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo, GetByIDKind kind)
-{
     if (forceICFailure(exec))
         return GiveUpOnCache;
     
@@ -276,7 +262,7 @@
             && !structure->needImpurePropertyWatchpoint()
             && !loadTargetFromProxy) {
             structure->startWatchingPropertyForReplacements(vm, slot.cachedOffset());
-            repatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), appropriateOptimizingGetByIdFunction(kind), true);
+            repatchByIdSelfAccess(codeBlock, stubInfo, structure, slot.cachedOffset(), operationGetByIdOptimize, true);
             stubInfo.initGetByIdSelf(codeBlock, structure, slot.cachedOffset());
             return RetryCacheLater;
         }
@@ -309,19 +295,7 @@
         if (slot.isCacheableGetter())
             getter = jsDynamicCast<JSFunction*>(slot.getterSetter()->getter());
 
-        if (kind == GetByIDKind::Pure) {
-            AccessCase::AccessType type;
-            if (slot.isCacheableValue())
-                type = AccessCase::Load;
-            else if (slot.isUnset())
-                type = AccessCase::Miss;
-            else if (slot.isCacheableGetter())
-                type = AccessCase::GetGetter;
-            else
-                RELEASE_ASSERT_NOT_REACHED();
-
-            newCase = AccessCase::tryGet(vm, codeBlock, type, offset, structure, conditionSet, loadTargetFromProxy, slot.watchpointSet());
-        } else if (!loadTargetFromProxy && getter && AccessCase::canEmitIntrinsicGetter(getter, structure))
+        if (!loadTargetFromProxy && getter && AccessCase::canEmitIntrinsicGetter(getter, structure))
             newCase = AccessCase::getIntrinsic(vm, codeBlock, getter, slot.cachedOffset(), structure, conditionSet);
         else {
             AccessCase::AccessType type;
@@ -356,12 +330,12 @@
     return RetryCacheLater;
 }
 
-void repatchGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo, GetByIDKind kind)
+void repatchGetByID(ExecState* exec, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo& stubInfo)
 {
     GCSafeConcurrentJITLocker locker(exec->codeBlock()->m_lock, exec->vm().heap);
     
-    if (tryCacheGetByID(exec, baseValue, propertyName, slot, stubInfo, kind) == GiveUpOnCache)
-        repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, appropriateGenericGetByIdFunction(kind));
+    if (tryCacheGetByID(exec, baseValue, propertyName, slot, stubInfo) == GiveUpOnCache)
+        repatchCall(exec->codeBlock(), stubInfo.callReturnLocation, operationGetById);
 }
 
 static V_JITOperation_ESsiJJI appropriateGenericPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
@@ -936,9 +910,9 @@
         callLinkInfo.remove();
 }
 
-void resetGetByID(CodeBlock* codeBlock, StructureStubInfo& stubInfo, GetByIDKind kind)
+void resetGetByID(CodeBlock* codeBlock, StructureStubInfo& stubInfo)
 {
-    repatchCall(codeBlock, stubInfo.callReturnLocation, appropriateOptimizingGetByIdFunction(kind));
+    repatchCall(codeBlock, stubInfo.callReturnLocation, operationGetByIdOptimize);
     resetGetByIDCheckAndLoad(stubInfo);
     MacroAssembler::repatchJump(stubInfo.callReturnLocation.jumpAtOffset(stubInfo.patch.deltaCallToJump), stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.deltaCallToSlowCase));
 }

Modified: trunk/Source/_javascript_Core/jit/Repatch.h (199107 => 199108)


--- trunk/Source/_javascript_Core/jit/Repatch.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jit/Repatch.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -35,12 +35,7 @@
 
 namespace JSC {
 
-enum class GetByIDKind {
-    Normal,
-    Pure
-};
-
-void repatchGetByID(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&, GetByIDKind);
+void repatchGetByID(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
 void buildGetByIDList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
 void buildGetByIDProtoList(ExecState*, JSValue, const Identifier&, const PropertySlot&, StructureStubInfo&);
 void repatchPutByID(ExecState*, JSValue, Structure*, const Identifier&, const PutPropertySlot&, StructureStubInfo&, PutKind);
@@ -51,7 +46,7 @@
 void unlinkFor(VM&, CallLinkInfo&);
 void linkVirtualFor(ExecState*, CallLinkInfo&);
 void linkPolymorphicCall(ExecState*, CallLinkInfo&, CallVariant);
-void resetGetByID(CodeBlock*, StructureStubInfo&, GetByIDKind);
+void resetGetByID(CodeBlock*, StructureStubInfo&);
 void resetPutByID(CodeBlock*, StructureStubInfo&);
 void resetIn(CodeBlock*, StructureStubInfo&);
 

Modified: trunk/Source/_javascript_Core/jsc.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/jsc.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/jsc.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include "ArrayPrototype.h"
-#include "BuiltinExecutables.h"
 #include "ButterflyInlines.h"
 #include "BytecodeGenerator.h"
 #include "CodeBlock.h"
@@ -33,7 +32,6 @@
 #include "Disassembler.h"
 #include "Exception.h"
 #include "ExceptionHelpers.h"
-#include "GetterSetter.h"
 #include "HeapProfiler.h"
 #include "HeapSnapshotBuilder.h"
 #include "HeapStatistics.h"
@@ -554,7 +552,6 @@
 static EncodedJSValue JSC_HOST_CALL functionCreateRuntimeArray(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionCreateImpureGetter(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionCreateCustomGetterObject(ExecState*);
-static EncodedJSValue JSC_HOST_CALL functionCreateBuiltin(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionSetImpureGetterDelegate(ExecState*);
 
 static EncodedJSValue JSC_HOST_CALL functionSetElementRoot(ExecState*);
@@ -575,7 +572,6 @@
 static EncodedJSValue JSC_HOST_CALL functionForceGCSlowPaths(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionHeapSize(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionAddressOf(ExecState*);
-static EncodedJSValue JSC_HOST_CALL functionGetGetterSetter(ExecState*);
 #ifndef NDEBUG
 static EncodedJSValue JSC_HOST_CALL functionDumpCallFrame(ExecState*);
 #endif
@@ -747,7 +743,6 @@
         addFunction(vm, "forceGCSlowPaths", functionForceGCSlowPaths, 0);
         addFunction(vm, "gcHeapSize", functionHeapSize, 0);
         addFunction(vm, "addressOf", functionAddressOf, 1);
-        addFunction(vm, "getGetterSetter", functionGetGetterSetter, 2);
 #ifndef NDEBUG
         addFunction(vm, "dumpCallFrame", functionDumpCallFrame, 0);
 #endif
@@ -797,7 +792,6 @@
 
         addFunction(vm, "createImpureGetter", functionCreateImpureGetter, 1);
         addFunction(vm, "createCustomGetterObject", functionCreateCustomGetterObject, 0);
-        addFunction(vm, "createBuiltin", functionCreateBuiltin, 2);
         addFunction(vm, "setImpureGetterDelegate", functionSetImpureGetterDelegate, 2);
 
         addFunction(vm, "dumpTypesForAllVariables", functionDumpTypesForAllVariables , 0);
@@ -1338,30 +1332,6 @@
     return returnValue;
 }
 
-static EncodedJSValue JSC_HOST_CALL functionGetGetterSetter(ExecState* exec)
-{
-    JSValue value = exec->argument(0);
-    if (!value.isObject())
-        return JSValue::encode(jsUndefined());
-
-    JSValue property = exec->argument(1);
-    if (!property.isString())
-        return JSValue::encode(jsUndefined());
-
-    Identifier ident = Identifier::fromString(&exec->vm(), property.toString(exec)->value(exec));
-
-    PropertySlot slot(value, PropertySlot::InternalMethodType::VMInquiry);
-    value.getPropertySlot(exec, ident, slot);
-
-    JSValue result;
-    if (slot.isCacheableGetter())
-        result = slot.getterSetter();
-    else
-        result = jsNull();
-
-    return JSValue::encode(result);
-}
-
 EncodedJSValue JSC_HOST_CALL functionVersion(ExecState*)
 {
     // We need this function for compatibility with the Mozilla JS tests but for now
@@ -1751,22 +1721,6 @@
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL functionCreateBuiltin(ExecState* exec)
-{
-    if (exec->argumentCount() < 1 || !exec->argument(0).isString())
-        return JSValue::encode(jsUndefined());
-
-    String functionText = exec->argument(0).toString(exec)->value(exec);
-    if (exec->hadException())
-        return JSValue::encode(JSValue());
-
-    VM& vm = exec->vm();
-    const SourceCode& source = makeSource(functionText);
-    JSFunction* func = JSFunction::createBuiltinFunction(vm, BuiltinExecutables::createExecutable(vm, source, Identifier::fromString(&vm, "foo"), ConstructorKind::None, ConstructAbility::CannotConstruct)->link(vm, source), exec->lexicalGlobalObject());
-
-    return JSValue::encode(func);
-}
-
 EncodedJSValue JSC_HOST_CALL functionCheckModuleSyntax(ExecState* exec)
 {
     String source = exec->argument(0).toString(exec)->value(exec);

Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/llint/LLIntData.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -144,9 +144,9 @@
     
     STATIC_ASSERT(StringType == 6);
     STATIC_ASSERT(SymbolType == 7);
-    STATIC_ASSERT(ObjectType == 20);
-    STATIC_ASSERT(FinalObjectType == 21);
-    STATIC_ASSERT(JSFunctionType == 23);
+    STATIC_ASSERT(ObjectType == 21);
+    STATIC_ASSERT(FinalObjectType == 22);
+    STATIC_ASSERT(JSFunctionType == 24);
     STATIC_ASSERT(MasqueradesAsUndefined == 1);
     STATIC_ASSERT(ImplementsDefaultHasInstance == 2);
     STATIC_ASSERT(FirstConstantRegisterIndex == 0x40000000);

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -545,19 +545,6 @@
     LLINT_RETURN(result);
 }
 
-LLINT_SLOW_PATH_DECL(slow_path_try_get_by_id)
-{
-    LLINT_BEGIN();
-    CodeBlock* codeBlock = exec->codeBlock();
-    const Identifier& ident = codeBlock->identifier(pc[3].u.operand);
-    JSValue baseValue = LLINT_OP_C(2).jsValue();
-    PropertySlot slot(baseValue, PropertySlot::PropertySlot::InternalMethodType::VMInquiry);
-
-    baseValue.getPropertySlot(exec, ident, slot);
-
-    LLINT_RETURN(slot.getPureResult());
-}
-
 LLINT_SLOW_PATH_DECL(slow_path_get_by_id)
 {
     LLINT_BEGIN();

Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h (199107 => 199108)


--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -69,7 +69,6 @@
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_regexp);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_instanceof);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_instanceof_custom);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_try_get_by_id);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_id);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_arguments_length);
 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_id);

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (199107 => 199108)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2016-04-06 18:49:54 UTC (rev 199108)
@@ -326,9 +326,9 @@
 # Type constants.
 const StringType = 6
 const SymbolType = 7
-const ObjectType = 20
-const FinalObjectType = 21
-const JSFunctionType = 23
+const ObjectType = 21
+const FinalObjectType = 22
+const JSFunctionType = 24
 
 # Type flags constants.
 const MasqueradesAsUndefined = 1
@@ -1301,12 +1301,6 @@
     dispatch(4)
 
 
-_llint_op_try_get_by_id:
-    traceExecution()
-    callSlowPath(_llint_slow_path_try_get_by_id)
-    dispatch(4)
-
-
 _llint_op_del_by_id:
     traceExecution()
     callSlowPath(_llint_slow_path_del_by_id)

Modified: trunk/Source/_javascript_Core/runtime/GetterSetter.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -33,7 +33,7 @@
 
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(GetterSetter);
 
-const ClassInfo GetterSetter::s_info = { "GetterSetter", &Base::s_info, 0, CREATE_METHOD_TABLE(GetterSetter) };
+const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
 
 void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {

Modified: trunk/Source/_javascript_Core/runtime/GetterSetter.h (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/GetterSetter.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/GetterSetter.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -41,21 +41,21 @@
 // that if a property holding a GetterSetter reference is constant-inferred and
 // that constant is observed to have a non-null setter (or getter) then we can
 // constant fold that setter (or getter).
-class GetterSetter final : public JSNonFinalObject {
+class GetterSetter final : public JSCell {
     friend class JIT;
-    typedef JSNonFinalObject Base;
+
 private:
     GetterSetter(VM& vm, JSGlobalObject* globalObject)
-        : Base(vm, vm.getterSetterStructure.get())
+        : JSCell(vm, vm.getterSetterStructure.get())
     {
         m_getter.set(vm, this, globalObject->nullGetterFunction());
         m_setter.set(vm, this, globalObject->nullSetterFunction());
     }
 
 public:
+    typedef JSCell Base;
+    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
 
-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | StructureIsImmortal;
-
     static GetterSetter* create(VM& vm, JSGlobalObject* globalObject)
     {
         GetterSetter* getterSetter = new (NotNull, allocateCell<GetterSetter>(vm.heap)) GetterSetter(vm, globalObject);
@@ -128,13 +128,8 @@
         return OBJECT_OFFSETOF(GetterSetter, m_setter);
     }
 
-    DECLARE_EXPORT_INFO;
+    DECLARE_INFO;
 
-    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&) { RELEASE_ASSERT_NOT_REACHED(); return false; }
-    static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&) { RELEASE_ASSERT_NOT_REACHED(); return false; }
-    static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool) { RELEASE_ASSERT_NOT_REACHED(); return false; }
-    static bool deleteProperty(JSCell*, ExecState*, PropertyName) { RELEASE_ASSERT_NOT_REACHED(); return false; }
-
 private:
     WriteBarrier<JSObject> m_getter;
     WriteBarrier<JSObject> m_setter;  

Modified: trunk/Source/_javascript_Core/runtime/JSType.h (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/JSType.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/JSType.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -35,6 +35,7 @@
     StringType,
     SymbolType,
 
+    GetterSetterType,
     CustomGetterSetterType,
     APIValueWrapperType,
 
@@ -74,7 +75,6 @@
     Float64ArrayType,
     DataViewType,
 
-    GetterSetterType,
     GlobalObjectType,
     LexicalEnvironmentType,
     GlobalLexicalEnvironmentType,

Modified: trunk/Source/_javascript_Core/runtime/PropertySlot.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/PropertySlot.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/PropertySlot.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -39,21 +39,4 @@
     return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(thisValue), propertyName));
 }
 
-JSValue PropertySlot::getPureResult() const
-{
-    JSValue result;
-    if (isTaintedByProxy())
-        result = jsNull();
-    else if (isCacheableValue())
-        result = JSValue::decode(m_data.value);
-    else if (isCacheableGetter())
-        result = getterSetter();
-    else if (isUnset())
-        result = jsUndefined();
-    else
-        result = jsNull();
-    
-    return result;
-}
-
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/PropertySlot.h (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/PropertySlot.h	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/PropertySlot.h	2016-04-06 18:49:54 UTC (rev 199108)
@@ -94,7 +94,6 @@
 
     JSValue getValue(ExecState*, PropertyName) const;
     JSValue getValue(ExecState*, unsigned propertyName) const;
-    JSValue getPureResult() const;
 
     bool isCacheable() const { return m_cacheability == CachingAllowed && m_offset != invalidOffset; }
     bool isUnset() const { return m_propertyType == TypeUnset; }

Modified: trunk/Source/_javascript_Core/runtime/ProxyObject.cpp (199107 => 199108)


--- trunk/Source/_javascript_Core/runtime/ProxyObject.cpp	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/runtime/ProxyObject.cpp	2016-04-06 18:49:54 UTC (rev 199108)
@@ -332,7 +332,8 @@
 bool ProxyObject::getOwnPropertySlotCommon(ExecState* exec, PropertyName propertyName, PropertySlot& slot)
 {
     slot.disableCaching();
-    slot.setIsTaintedByProxy();
+    if (slot.internalMethodType() != PropertySlot::InternalMethodType::VMInquiry)
+        slot.setIsTaintedByProxy();
     switch (slot.internalMethodType()) {
     case PropertySlot::InternalMethodType::Get:
         slot.setCustom(this, CustomAccessor, performProxyGet);

Deleted: trunk/Source/_javascript_Core/tests/stress/try-get-by-id.js (199107 => 199108)


--- trunk/Source/_javascript_Core/tests/stress/try-get-by-id.js	2016-04-06 18:39:59 UTC (rev 199107)
+++ trunk/Source/_javascript_Core/tests/stress/try-get-by-id.js	2016-04-06 18:49:54 UTC (rev 199108)
@@ -1,117 +0,0 @@
-function tryGetByIdText(propertyName) { return `(function (base) { return @tryGetById(base, '${propertyName}'); })`; }
-
-
-// Test get value off object.
-{
-    let getCaller = createBuiltin(tryGetByIdText("caller"));
-    noInline(getCaller);
-    let obj = {caller: 1};
-
-    for (let i = 0; i < 100000; i++) {
-        if (getCaller(obj) !== 1)
-            throw new Error("wrong on iteration: " + i);
-    }
-}
-
-// Test slot is custom function trap for a value.
-{
-    let getCaller = createBuiltin(tryGetByIdText("caller"));
-    noInline(getCaller);
-    let func = function () {};
-
-    for (let i = 0; i < 100000; i++) {
-        if (getCaller(func) !== null)
-            throw new Error("wrong on iteration: " + i);
-    }
-}
-
-// Test slot is a GetterSetter.
-{
-    let get = createBuiltin(tryGetByIdText("getterSetter"));
-    noInline(get);
-    let obj = {};
-    Object.defineProperty(obj, "getterSetter", { get: function () { throw new Error("should not be called"); } });
-
-    for (let i = 0; i < 100000; i++) {
-        if (get(obj) !== getGetterSetter(obj, "getterSetter"))
-            throw new Error("wrong on iteration: " + i);
-    }
-}
-
-// Test slot is unset.
-{
-    let get = createBuiltin(tryGetByIdText("getterSetter"));
-    noInline(get);
-    let obj = {};
-
-    for (let i = 0; i < 100000; i++) {
-        if (get(obj) !== undefined)
-            throw new Error("wrong on iteration: " + i);
-    }
-}
-
-// Test slot is on a proxy with value.
-{
-    let get = createBuiltin(tryGetByIdText("value"));
-    noInline(get);
-
-    let obj = {value: 1};
-    let p = new Proxy(obj, { get: function() { throw new Error("should not be called"); } });
-
-    for (let i = 0; i < 100000; i++) {
-        if (get(p) !== null)
-            throw new Error("wrong on iteration: " + i);
-    }
-}
-
-// Test mutating inline cache.
-{
-    let get = createBuiltin(tryGetByIdText("caller"));
-    noInline(get);
-
-    let obj = {caller : 1};
-    let func = function() {};
-
-    for (let i = 0; i < 100000; i++) {
-        if (i % 100 === 0) {
-            if (get(func) !== null)
-                throw new Error("wrong on iteration: " + i);
-        } else {
-            if (get(obj) !== 1)
-                throw new Error("wrong on iteration: " + i);
-        }
-    }
-}
-
-// Test new type on each iteration.
-{
-    let get = createBuiltin(tryGetByIdText("caller"));
-    noInline(get);
-
-    let func = function() {};
-
-    for (let i = 0; i < 100000; i++) {
-        if (i % 100 === 0) {
-            if (get(func) !== null)
-                throw new Error("wrong on iteration: " + i);
-        } else {
-            let obj = {caller : 1};
-            if (get(obj) !== 1)
-                throw new Error("wrong on iteration: " + i);
-        }
-    }
-}
-
-// Test with array length. This is null because the value is not cacheable.
-{
-    let get = createBuiltin(tryGetByIdText("length"));
-    noInline(get);
-
-    let arr = [];
-
-    for (let i = 0; i < 100000; i++) {
-        if (get(arr) !== null)
-            throw new Error("wrong on iteration: " + i);
-
-    }
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to