mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement CodeCache for bytecode
* store/load global ByteCodeBlock Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
3ec80377db
commit
11e469c6fa
26 changed files with 1463 additions and 674 deletions
|
|
@ -563,13 +563,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static bool evalScript(ContextRef* context, StringRef* str, StringRef* fileName, bool shouldPrintScriptResult, bool isModule)
|
||||
static bool evalScript(ContextRef* context, StringRef* str, StringRef* srcName, bool shouldPrintScriptResult, bool isModule)
|
||||
{
|
||||
if (stringEndsWith(fileName->toStdUTF8String(), "mjs")) {
|
||||
if (stringEndsWith(srcName->toStdUTF8String(), "mjs")) {
|
||||
isModule = isModule || true;
|
||||
}
|
||||
|
||||
auto scriptInitializeResult = context->scriptParser()->initializeScript(str, fileName, isModule);
|
||||
auto scriptInitializeResult = context->scriptParser()->initializeScript(str, srcName, isModule);
|
||||
if (!scriptInitializeResult.script) {
|
||||
fprintf(stderr, "Script parsing error: ");
|
||||
switch (scriptInitializeResult.parseErrorCode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue