Skip to content

Commit d9a82e6

Browse files
Removed 'm_code' field from 'JSFunction' class, as it is no longer used. Was used by 'TinyJS'.
1 parent 180cd29 commit d9a82e6

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

JsVars.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ Ref<JSFunction> JSFunction::createNative(const std::string& name, JSNativeFn fnP
643643
JSFunction::JSFunction(const std::string& name, JSNativeFn pNative) :
644644
JSObject(DefaultPrototype),
645645
m_name(name),
646-
m_code(""),
647646
m_pNative(pNative)
648647
{
649648
//Prototype object, used when the function acts as a constructor.

JsVars.h

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,6 @@ class JSFunction : public JSObject
539539
return m_name;
540540
}
541541

542-
void setCode(CScriptToken token)
543-
{
544-
m_code = token;
545-
}
546-
547542
void setCodeMVM(Ref<RefCountObj> code)
548543
{
549544
m_codeMVM = code;
@@ -564,11 +559,6 @@ class JSFunction : public JSObject
564559
return m_pNative;
565560
}
566561

567-
CScriptToken codeBlock()const
568-
{
569-
return m_code;
570-
}
571-
572562
// JSValue
573563
/////////////////////////////////////////
574564
virtual std::string toString()const;
@@ -592,18 +582,11 @@ class JSFunction : public JSObject
592582

593583
private:
594584

595-
JSFunction(const std::string& name, JSNativeFn pNative) :
596-
JSObject(DefaultPrototype),
597-
m_name(name),
598-
m_code(""),
599-
m_pNative(pNative)
600-
{
601-
}
585+
JSFunction(const std::string& name, JSNativeFn pNative);
602586

603587
~JSFunction();
604588

605589
const std::string m_name;
606-
CScriptToken m_code;
607590
Ref<RefCountObj> m_codeMVM;
608591
const JSNativeFn m_pNative;
609592
ParametersList m_params;

0 commit comments

Comments
 (0)