浏览代码

Delete dead code - unused (and broken) secondary BoundFunction constructor

rhuanjl 7 年之前
父节点
当前提交
eaf98b3295
共有 2 个文件被更改,包括 1 次插入23 次删除
  1. 0 22
      lib/Runtime/Library/BoundFunction.cpp
  2. 1 1
      lib/Runtime/Library/BoundFunction.h

+ 0 - 22
lib/Runtime/Library/BoundFunction.cpp

@@ -24,7 +24,6 @@ namespace Js
         count(0),
         boundArgs(nullptr)
     {
-
         DebugOnly(VerifyEntryPoint());
         AssertMsg(args.Info.Count > 0, "wrong number of args in BoundFunction");
 
@@ -90,27 +89,6 @@ namespace Js
         SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(len), PropertyConfigurable, nullptr, PropertyOperation_None, SideEffects_None);
     }
 
-    BoundFunction::BoundFunction(RecyclableObject* targetFunction, Var boundThis, Var* args, uint argsCount, DynamicType * type)
-        : JavascriptFunction(type, &functionInfo),
-        count(argsCount),
-        boundArgs(nullptr)
-    {
-        DebugOnly(VerifyEntryPoint());
-
-        this->targetFunction = targetFunction;
-        this->boundThis = boundThis;
-
-        if (argsCount != 0)
-        {
-            this->boundArgs = RecyclerNewArray(this->GetScriptContext()->GetRecycler(), Field(Var), argsCount);
-
-            for (uint i = 0; i < argsCount; i++)
-            {
-                this->boundArgs[i] = args[i];
-            }
-        }
-    }
-
     BoundFunction* BoundFunction::New(ScriptContext* scriptContext, ArgumentReader args)
     {
         Recycler* recycler = scriptContext->GetRecycler();

+ 1 - 1
lib/Runtime/Library/BoundFunction.h

@@ -19,7 +19,7 @@ namespace Js
     protected:
         BoundFunction(DynamicType * type);
         BoundFunction(Arguments args, DynamicType * type);
-        BoundFunction(RecyclableObject* targetFunction, Var boundThis, Var* args, uint argsCount, DynamicType *type);
+
     public:
         static BoundFunction* New(ScriptContext* scriptContext, ArgumentReader args);