Javascript interpreter supports for JSC and V8 simultaneously.
Before, one had to build two different versions.
This commit is contained in:
parent
008adca72f
commit
caa6827daf
5 changed files with 40 additions and 15 deletions
|
|
@ -10,7 +10,7 @@ class JSShell {
|
|||
|
||||
public:
|
||||
enum Engine {
|
||||
JSC,
|
||||
JSC = 0,
|
||||
V8
|
||||
};
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ public:
|
|||
|
||||
virtual ~JSShell() = 0;
|
||||
|
||||
static JSShell* Create();
|
||||
static JSShell* Create(Engine engine = JSC);
|
||||
|
||||
bool ImportModule(const std::string& name);
|
||||
|
||||
|
|
@ -46,6 +46,4 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
typedef JSShell* (*JSShellFactory)();
|
||||
|
||||
#endif // JS_SHELL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue