Javascript interpreter supports for JSC and V8 simultaneously.

Before, one had to build two different versions.
This commit is contained in:
Oliver Buchtala 2012-11-23 01:09:11 +01:00
commit caa6827daf
5 changed files with 40 additions and 15 deletions

View file

@ -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