Skip to content

Commit

Permalink
Delete dead code - unused (and broken) secondary BoundFunction constr…
Browse files Browse the repository at this point in the history
…uctor
  • Loading branch information
rhuanjl committed Jul 3, 2018
1 parent ab44a45 commit a1a3401
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
22 changes: 0 additions & 22 deletions lib/Runtime/Library/BoundFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ namespace Js
count(0),
boundArgs(nullptr)
{

DebugOnly(VerifyEntryPoint());
AssertMsg(args.Info.Count > 0, "wrong number of args in BoundFunction");

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion lib/Runtime/Library/BoundFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a1a3401

Please sign in to comment.