[wasm] asm.js - Check stdlib.NaN is valid, prepare for the rest.
Record which asm.js stdlib members are used and add a check that NaN is actually correctly set. Other stdlib members to be added in a later change. Also add a stdlib argument to Wasm.instantiateModuleFromAsm, in preparation for that function to be replaced by normal asm.js instantiation. BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203 LOG=N R=jpp@chromium.org,titzer@chromium.org Review-Url: https://codereview.chromium.org/2251433002 Cr-Commit-Position: refs/heads/master@{#38760}
This commit is contained in:
parent
e3ad26fee6
commit
561bfcb70d
@ -53,6 +53,70 @@ i::MaybeHandle<i::FixedArray> CompileModule(
|
||||
return compiled_module;
|
||||
}
|
||||
|
||||
bool IsStdlibMemberValid(i::Isolate* isolate, Handle<JSReceiver> stdlib,
|
||||
i::Handle<i::Object> member_id) {
|
||||
int32_t member_kind;
|
||||
if (!member_id->ToInt32(&member_kind)) {
|
||||
UNREACHABLE();
|
||||
}
|
||||
switch (member_kind) {
|
||||
case wasm::AsmTyper::StandardMember::kNone:
|
||||
case wasm::AsmTyper::StandardMember::kModule:
|
||||
case wasm::AsmTyper::StandardMember::kStdlib: {
|
||||
// Nothing to check for these.
|
||||
return true;
|
||||
}
|
||||
case wasm::AsmTyper::StandardMember::kNaN: {
|
||||
i::Handle<i::Name> name(isolate->factory()->InternalizeOneByteString(
|
||||
STATIC_CHAR_VECTOR("NaN")));
|
||||
i::MaybeHandle<i::Object> maybe_value =
|
||||
i::Object::GetProperty(stdlib, name);
|
||||
if (maybe_value.is_null()) {
|
||||
return false;
|
||||
}
|
||||
i::Handle<i::Object> value = maybe_value.ToHandleChecked();
|
||||
if (!value->IsNaN()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case wasm::AsmTyper::StandardMember::kHeap:
|
||||
case wasm::AsmTyper::StandardMember::kFFI:
|
||||
case wasm::AsmTyper::StandardMember::kInfinity:
|
||||
case wasm::AsmTyper::StandardMember::kMathAcos:
|
||||
case wasm::AsmTyper::StandardMember::kMathAsin:
|
||||
case wasm::AsmTyper::StandardMember::kMathAtan:
|
||||
case wasm::AsmTyper::StandardMember::kMathCos:
|
||||
case wasm::AsmTyper::StandardMember::kMathSin:
|
||||
case wasm::AsmTyper::StandardMember::kMathTan:
|
||||
case wasm::AsmTyper::StandardMember::kMathExp:
|
||||
case wasm::AsmTyper::StandardMember::kMathLog:
|
||||
case wasm::AsmTyper::StandardMember::kMathCeil:
|
||||
case wasm::AsmTyper::StandardMember::kMathFloor:
|
||||
case wasm::AsmTyper::StandardMember::kMathSqrt:
|
||||
case wasm::AsmTyper::StandardMember::kMathAbs:
|
||||
case wasm::AsmTyper::StandardMember::kMathClz32:
|
||||
case wasm::AsmTyper::StandardMember::kMathMin:
|
||||
case wasm::AsmTyper::StandardMember::kMathMax:
|
||||
case wasm::AsmTyper::StandardMember::kMathAtan2:
|
||||
case wasm::AsmTyper::StandardMember::kMathPow:
|
||||
case wasm::AsmTyper::StandardMember::kMathImul:
|
||||
case wasm::AsmTyper::StandardMember::kMathFround:
|
||||
case wasm::AsmTyper::StandardMember::kMathE:
|
||||
case wasm::AsmTyper::StandardMember::kMathLN10:
|
||||
case wasm::AsmTyper::StandardMember::kMathLN2:
|
||||
case wasm::AsmTyper::StandardMember::kMathLOG2E:
|
||||
case wasm::AsmTyper::StandardMember::kMathLOG10E:
|
||||
case wasm::AsmTyper::StandardMember::kMathPI:
|
||||
case wasm::AsmTyper::StandardMember::kMathSQRT1_2:
|
||||
case wasm::AsmTyper::StandardMember::kMathSQRT2:
|
||||
// TODO(bradnelson) Actually check these.
|
||||
return true;
|
||||
default: { UNREACHABLE(); }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) {
|
||||
@ -74,16 +138,37 @@ MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) {
|
||||
internal::wasm::kAsmJsOrigin);
|
||||
DCHECK(!compiled.is_null());
|
||||
|
||||
Handle<FixedArray> result = info->isolate()->factory()->NewFixedArray(2);
|
||||
wasm::AsmTyper::StdlibSet uses = typer.StdlibUses();
|
||||
Handle<FixedArray> uses_array =
|
||||
info->isolate()->factory()->NewFixedArray(static_cast<int>(uses.size()));
|
||||
int count = 0;
|
||||
for (auto i : uses) {
|
||||
uses_array->set(count++, Smi::FromInt(i));
|
||||
}
|
||||
|
||||
Handle<FixedArray> result = info->isolate()->factory()->NewFixedArray(3);
|
||||
result->set(0, *compiled.ToHandleChecked());
|
||||
result->set(1, *foreign_globals);
|
||||
result->set(2, *uses_array);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool AsmJs::IsStdlibValid(i::Isolate* isolate, Handle<FixedArray> wasm_data,
|
||||
Handle<JSReceiver> stdlib) {
|
||||
i::Handle<i::FixedArray> uses(i::FixedArray::cast(wasm_data->get(2)));
|
||||
for (int i = 0; i < uses->length(); ++i) {
|
||||
if (!IsStdlibMemberValid(isolate, stdlib,
|
||||
uses->GetValueChecked<i::Object>(isolate, i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
MaybeHandle<Object> AsmJs::InstantiateAsmWasm(i::Isolate* isolate,
|
||||
Handle<FixedArray> wasm_data,
|
||||
Handle<JSArrayBuffer> memory,
|
||||
Handle<JSObject> foreign) {
|
||||
Handle<JSReceiver> foreign) {
|
||||
i::Handle<i::FixedArray> compiled(i::FixedArray::cast(wasm_data->get(0)));
|
||||
i::Handle<i::FixedArray> foreign_globals(
|
||||
i::FixedArray::cast(wasm_data->get(1)));
|
||||
|
@ -20,10 +20,12 @@ namespace internal {
|
||||
class AsmJs {
|
||||
public:
|
||||
static MaybeHandle<FixedArray> ConvertAsmToWasm(i::ParseInfo* info);
|
||||
static bool IsStdlibValid(i::Isolate* isolate, Handle<FixedArray> wasm_data,
|
||||
Handle<JSReceiver> stdlib);
|
||||
static MaybeHandle<Object> InstantiateAsmWasm(i::Isolate* isolate,
|
||||
Handle<FixedArray> wasm_data,
|
||||
Handle<JSArrayBuffer> memory,
|
||||
Handle<JSObject> foreign);
|
||||
Handle<JSReceiver> foreign);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -428,7 +428,9 @@ AsmTyper::StandardMember AsmTyper::VariableAsStandardMember(Variable* var) {
|
||||
if (var_info == nullptr) {
|
||||
return kNone;
|
||||
}
|
||||
return var_info->standard_member();
|
||||
StandardMember member = var_info->standard_member();
|
||||
stdlib_uses_.insert(member);
|
||||
return member;
|
||||
}
|
||||
|
||||
bool AsmTyper::Validate() {
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "src/allocation.h"
|
||||
#include "src/asmjs/asm-types.h"
|
||||
@ -74,6 +75,10 @@ class AsmTyper final {
|
||||
AsmType* TypeOf(AstNode* node) const;
|
||||
StandardMember VariableAsStandardMember(Variable* var);
|
||||
|
||||
typedef std::unordered_set<StandardMember, std::hash<int> > StdlibSet;
|
||||
|
||||
StdlibSet StdlibUses() const { return stdlib_uses_; }
|
||||
|
||||
private:
|
||||
friend class v8::internal::wasm::AsmTyperHarnessBuilder;
|
||||
|
||||
@ -320,6 +325,7 @@ class AsmTyper final {
|
||||
AsmType* fround_type_;
|
||||
AsmType* ffi_type_;
|
||||
char error_message_[kErrorMessageLimit];
|
||||
StdlibSet stdlib_uses_;
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper);
|
||||
};
|
||||
|
@ -94,7 +94,9 @@ RUNTIME_FUNCTION(Runtime_InstantiateAsmJs) {
|
||||
if (args[3]->IsJSArrayBuffer()) {
|
||||
memory = args.at<i::JSArrayBuffer>(3);
|
||||
}
|
||||
if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData()) {
|
||||
if (args[1]->IsJSObject() && function->shared()->HasAsmWasmData() &&
|
||||
AsmJs::IsStdlibValid(isolate, handle(function->shared()->asm_wasm_data()),
|
||||
args.at<JSReceiver>(1))) {
|
||||
MaybeHandle<Object> result;
|
||||
result = AsmJs::InstantiateAsmWasm(
|
||||
isolate, handle(function->shared()->asm_wasm_data()), memory, foreign);
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "src/api-natives.h"
|
||||
#include "src/api.h"
|
||||
#include "src/asmjs/asm-js.h"
|
||||
#include "src/asmjs/asm-typer.h"
|
||||
#include "src/asmjs/asm-wasm-builder.h"
|
||||
#include "src/assert-scope.h"
|
||||
@ -124,45 +125,34 @@ void VerifyFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
if (result.val) delete result.val;
|
||||
}
|
||||
|
||||
v8::internal::wasm::ZoneBuffer* TranslateAsmModule(
|
||||
i::ParseInfo* info, ErrorThrower* thrower,
|
||||
i::Handle<i::FixedArray>* foreign_args) {
|
||||
i::MaybeHandle<i::FixedArray> TranslateAsmModule(i::ParseInfo* info,
|
||||
ErrorThrower* thrower) {
|
||||
info->set_global();
|
||||
info->set_lazy(false);
|
||||
info->set_allow_lazy_parsing(false);
|
||||
info->set_toplevel(true);
|
||||
|
||||
if (!i::Compiler::ParseAndAnalyze(info)) {
|
||||
return nullptr;
|
||||
return i::MaybeHandle<i::FixedArray>();
|
||||
}
|
||||
|
||||
if (info->scope()->declarations()->length() == 0) {
|
||||
thrower->Error("Asm.js validation failed: no declarations in scope");
|
||||
return nullptr;
|
||||
return i::MaybeHandle<i::FixedArray>();
|
||||
}
|
||||
|
||||
if (!info->scope()->declarations()->at(0)->IsFunctionDeclaration()) {
|
||||
thrower->Error("Asm.js validation failed: non-function declaration");
|
||||
return nullptr;
|
||||
return i::MaybeHandle<i::FixedArray>();
|
||||
}
|
||||
|
||||
info->set_literal(
|
||||
info->scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
|
||||
|
||||
v8::internal::wasm::AsmTyper typer(info->isolate(), info->zone(),
|
||||
*(info->script()), info->literal());
|
||||
if (!typer.Validate()) {
|
||||
thrower->Error("Asm.js validation failed: %s", typer.error_message());
|
||||
return nullptr;
|
||||
return i::AsmJs::ConvertAsmToWasm(info);
|
||||
}
|
||||
|
||||
v8::internal::wasm::AsmWasmBuilder builder(info->isolate(), info->zone(),
|
||||
info->literal(), &typer);
|
||||
|
||||
return builder.Run(foreign_args);
|
||||
}
|
||||
|
||||
i::MaybeHandle<i::JSObject> InstantiateModuleCommon(
|
||||
i::MaybeHandle<i::JSObject> InstantiateModule(
|
||||
const v8::FunctionCallbackInfo<v8::Value>& args, const byte* start,
|
||||
const byte* end, ErrorThrower* thrower,
|
||||
internal::wasm::ModuleOrigin origin = i::wasm::kWasmOrigin) {
|
||||
@ -175,16 +165,14 @@ i::MaybeHandle<i::JSObject> InstantiateModuleCommon(
|
||||
isolate, &zone, start, end, false, origin);
|
||||
|
||||
i::MaybeHandle<i::JSObject> object;
|
||||
if (result.failed() && origin == internal::wasm::kAsmJsOrigin) {
|
||||
thrower->Error("Asm.js converted module failed to decode");
|
||||
} else if (result.failed()) {
|
||||
if (result.failed()) {
|
||||
thrower->Failed("", result);
|
||||
} else {
|
||||
// Success. Instantiate the module and return the object.
|
||||
i::Handle<i::JSReceiver> ffi = i::Handle<i::JSObject>::null();
|
||||
i::Handle<i::JSObject> ffi = i::Handle<i::JSObject>::null();
|
||||
if (args.Length() > 1 && args[1]->IsObject()) {
|
||||
Local<Object> obj = Local<Object>::Cast(args[1]);
|
||||
ffi = i::Handle<i::JSReceiver>::cast(v8::Utils::OpenHandle(*obj));
|
||||
ffi = i::Handle<i::JSObject>::cast(v8::Utils::OpenHandle(*obj));
|
||||
}
|
||||
|
||||
i::Handle<i::JSArrayBuffer> memory = i::Handle<i::JSArrayBuffer>::null();
|
||||
@ -226,60 +214,52 @@ void InstantiateModuleFromAsm(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
i::Handle<i::Script> script = factory->NewScript(Utils::OpenHandle(*source));
|
||||
i::ParseInfo info(&zone, script);
|
||||
|
||||
i::Handle<i::Object> foreign;
|
||||
if (args.Length() > 1 && args[1]->IsObject()) {
|
||||
Local<Object> local_foreign = Local<Object>::Cast(args[1]);
|
||||
foreign = v8::Utils::OpenHandle(*local_foreign);
|
||||
}
|
||||
|
||||
i::Handle<i::FixedArray> foreign_args;
|
||||
auto module = TranslateAsmModule(&info, &thrower, &foreign_args);
|
||||
if (module == nullptr) {
|
||||
auto wasm_data = TranslateAsmModule(&info, &thrower);
|
||||
if (wasm_data.is_null()) {
|
||||
thrower.Error("asm.js failed to validate");
|
||||
return;
|
||||
}
|
||||
|
||||
i::MaybeHandle<i::Object> maybe_module_object =
|
||||
InstantiateModuleCommon(args, module->begin(), module->end(), &thrower,
|
||||
internal::wasm::kAsmJsOrigin);
|
||||
i::Handle<i::JSReceiver> stdlib;
|
||||
if (args.Length() > 1 && args[1]->IsObject()) {
|
||||
Local<Object> obj = Local<Object>::Cast(args[1]);
|
||||
i::Handle<i::Object> hobj =
|
||||
i::Handle<i::Object>::cast(v8::Utils::OpenHandle(*obj));
|
||||
if (hobj->IsJSReceiver()) {
|
||||
stdlib = i::Handle<i::JSReceiver>::cast(v8::Utils::OpenHandle(*obj));
|
||||
}
|
||||
}
|
||||
|
||||
i::Handle<i::JSReceiver> foreign;
|
||||
if (args.Length() > 2 && args[2]->IsObject()) {
|
||||
Local<Object> obj = Local<Object>::Cast(args[2]);
|
||||
i::Handle<i::Object> hobj =
|
||||
i::Handle<i::Object>::cast(v8::Utils::OpenHandle(*obj));
|
||||
if (hobj->IsJSReceiver()) {
|
||||
foreign = i::Handle<i::JSReceiver>::cast(v8::Utils::OpenHandle(*obj));
|
||||
}
|
||||
}
|
||||
|
||||
i::Handle<i::JSArrayBuffer> memory = i::Handle<i::JSArrayBuffer>::null();
|
||||
if (args.Length() > 3 && args[3]->IsArrayBuffer()) {
|
||||
Local<Object> obj = Local<Object>::Cast(args[3]);
|
||||
i::Handle<i::Object> mem_obj = v8::Utils::OpenHandle(*obj);
|
||||
memory = i::Handle<i::JSArrayBuffer>(i::JSArrayBuffer::cast(*mem_obj));
|
||||
}
|
||||
|
||||
if (!i::AsmJs::IsStdlibValid(isolate, wasm_data.ToHandleChecked(), stdlib)) {
|
||||
thrower.Error("Asm module uses missing stdlib function");
|
||||
return;
|
||||
}
|
||||
|
||||
i::MaybeHandle<i::Object> maybe_module_object = i::AsmJs::InstantiateAsmWasm(
|
||||
isolate, wasm_data.ToHandleChecked(), memory, foreign);
|
||||
if (maybe_module_object.is_null()) {
|
||||
return;
|
||||
}
|
||||
|
||||
i::Handle<i::Name> name =
|
||||
factory->NewStringFromStaticChars("__foreign_init__");
|
||||
|
||||
i::Handle<i::Object> module_object = maybe_module_object.ToHandleChecked();
|
||||
i::MaybeHandle<i::Object> maybe_init =
|
||||
i::Object::GetProperty(module_object, name);
|
||||
DCHECK(!maybe_init.is_null());
|
||||
|
||||
i::Handle<i::Object> init = maybe_init.ToHandleChecked();
|
||||
i::Handle<i::Object> undefined = isolate->factory()->undefined_value();
|
||||
i::Handle<i::Object>* foreign_args_array =
|
||||
new i::Handle<i::Object>[foreign_args->length()];
|
||||
for (int j = 0; j < foreign_args->length(); j++) {
|
||||
if (!foreign.is_null()) {
|
||||
i::MaybeHandle<i::Name> name = i::Object::ToName(
|
||||
isolate, i::Handle<i::Object>(foreign_args->get(j), isolate));
|
||||
if (!name.is_null()) {
|
||||
i::MaybeHandle<i::Object> val =
|
||||
i::Object::GetProperty(foreign, name.ToHandleChecked());
|
||||
if (!val.is_null()) {
|
||||
foreign_args_array[j] = val.ToHandleChecked();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreign_args_array[j] = undefined;
|
||||
}
|
||||
i::MaybeHandle<i::Object> retval = i::Execution::Call(
|
||||
isolate, init, undefined, foreign_args->length(), foreign_args_array);
|
||||
delete[] foreign_args_array;
|
||||
|
||||
if (retval.is_null()) {
|
||||
thrower.Error(
|
||||
"WASM.instantiateModuleFromAsm(): foreign init function failed");
|
||||
}
|
||||
args.GetReturnValue().Set(
|
||||
v8::Utils::ToLocal(maybe_module_object.ToHandleChecked()));
|
||||
}
|
||||
|
||||
void InstantiateModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
@ -294,7 +274,7 @@ void InstantiateModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
RawBuffer buffer = GetRawBufferSource(args[0], &thrower);
|
||||
if (buffer.start == nullptr) return;
|
||||
|
||||
InstantiateModuleCommon(args, buffer.start, buffer.end, &thrower);
|
||||
InstantiateModule(args, buffer.start, buffer.end, &thrower);
|
||||
}
|
||||
|
||||
static i::MaybeHandle<i::JSObject> CreateModuleObject(
|
||||
|
@ -18,7 +18,7 @@ function __f_8(global, env) {
|
||||
return {'__f_9': __f_9}
|
||||
}
|
||||
function __f_5() {
|
||||
var __v_5 = Wasm.instantiateModuleFromAsm( __f_8.toString(), {'__f_7': __f_7});
|
||||
var __v_5 = Wasm.instantiateModuleFromAsm( __f_8.toString(), {}, {'__f_7': __f_7});
|
||||
__v_5.__f_9(0, 0, 0);
|
||||
}
|
||||
__f_5();
|
||||
|
@ -36,7 +36,7 @@ function __f_1(asmfunc, expect) {
|
||||
var __v_5 = asmfunc(__v_3);
|
||||
expect(__v_5);
|
||||
print("Testing " + asmfunc.name + " (wasm)...");
|
||||
var __v_6 = Wasm.instantiateModuleFromAsm(__v_1, __v_3);
|
||||
var __v_6 = Wasm.instantiateModuleFromAsm(__v_1, {}, __v_3);
|
||||
expect(__v_6);
|
||||
}
|
||||
function __f_2() {
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
function test() {
|
||||
var wasm = Wasm.instantiateModuleFromAsm(
|
||||
Module.toString(), {'deopt': deopt});
|
||||
Module.toString(), null, {'deopt': deopt});
|
||||
wasm._main(0, 0, 0);
|
||||
}
|
||||
test();
|
||||
|
@ -67,7 +67,8 @@ function RunThreeWayTest(asmfunc, expect) {
|
||||
expect(asm_module);
|
||||
|
||||
print("Testing " + asmfunc.name + " (wasm)...");
|
||||
var wasm_module = Wasm.instantiateModuleFromAsm(asm_source, null, buffer);
|
||||
var wasm_module = Wasm.instantiateModuleFromAsm(
|
||||
asm_source, stdlib, null, buffer);
|
||||
expect(wasm_module);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
// Flags: --expose-wasm
|
||||
|
||||
var stdlib = this;
|
||||
|
||||
(function TestStdlibConstants() {
|
||||
function Module(stdlib) {
|
||||
"use asm";
|
||||
@ -39,12 +41,38 @@
|
||||
return {caller:caller, nanCheck:nanCheck};
|
||||
}
|
||||
|
||||
var m =Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
assertEquals(1, m.caller());
|
||||
assertTrue(isNaN(m.nanCheck()));
|
||||
})();
|
||||
|
||||
|
||||
(function TestBadNaNStdlib() {
|
||||
function Module(stdlib) {
|
||||
"use asm";
|
||||
var StdlibNaN = stdlib.NaN;
|
||||
function foo() { return +StdlibNaN; }
|
||||
return {};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), { NaN: 0 });
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
(function TestMissingNaNStdlib() {
|
||||
function Module(stdlib) {
|
||||
"use asm";
|
||||
var StdlibNaN = stdlib.NaN;
|
||||
function foo() { return +StdlibNaN; }
|
||||
return {};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), {});
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
(function TestStdlibFunctionsInside() {
|
||||
function Module(stdlib) {
|
||||
"use asm";
|
||||
@ -120,7 +148,7 @@
|
||||
return {caller:caller};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
assertEquals(1, m.caller());
|
||||
})();
|
||||
|
||||
@ -264,7 +292,7 @@
|
||||
max_f64: max_f64,
|
||||
};
|
||||
}
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
var values = {
|
||||
i32: [
|
||||
0, 1, -1, 123, 456, -123, -456,
|
||||
|
@ -4,10 +4,12 @@
|
||||
|
||||
// Flags: --expose-wasm
|
||||
|
||||
var stdlib = this;
|
||||
|
||||
function assertWasm(expected, func, ffi) {
|
||||
print("Testing " + func.name + "...");
|
||||
assertEquals(expected, Wasm.instantiateModuleFromAsm(
|
||||
func.toString(), ffi).caller());
|
||||
func.toString(), stdlib, ffi).caller());
|
||||
}
|
||||
|
||||
function EmptyTest() {
|
||||
@ -105,7 +107,7 @@ function BadModule() {
|
||||
}
|
||||
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(BadModule.toString()).caller();
|
||||
Wasm.instantiateModuleFromAsm(BadModule.toString(), stdlib).caller();
|
||||
});
|
||||
|
||||
|
||||
@ -499,7 +501,7 @@ function TestInt32HeapAccessExternal() {
|
||||
var memory = new ArrayBuffer(1024);
|
||||
var memory_int32 = new Int32Array(memory);
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestInt32HeapAccess.toString(), null, memory);
|
||||
TestInt32HeapAccess.toString(), stdlib, null, memory);
|
||||
assertEquals(7, module.caller());
|
||||
assertEquals(7, memory_int32[2]);
|
||||
}
|
||||
@ -522,10 +524,10 @@ function TestHeapAccessIntTypes() {
|
||||
code = code.replace(/>> 2/g, types[i][2]);
|
||||
var memory = new ArrayBuffer(1024);
|
||||
var memory_view = new types[i][0](memory);
|
||||
var module = Wasm.instantiateModuleFromAsm(code, null, memory);
|
||||
var module = Wasm.instantiateModuleFromAsm(code, stdlib, null, memory);
|
||||
assertEquals(7, module.caller());
|
||||
assertEquals(7, memory_view[2]);
|
||||
assertEquals(7, Wasm.instantiateModuleFromAsm(code).caller());
|
||||
assertEquals(7, Wasm.instantiateModuleFromAsm(code, stdlib).caller());
|
||||
}
|
||||
}
|
||||
|
||||
@ -554,14 +556,14 @@ function TestFloatHeapAccess(stdlib, foreign, buffer) {
|
||||
}
|
||||
|
||||
assertEquals(1, Wasm.instantiateModuleFromAsm(
|
||||
TestFloatHeapAccess.toString()).caller());
|
||||
TestFloatHeapAccess.toString(), stdlib).caller());
|
||||
|
||||
|
||||
function TestFloatHeapAccessExternal() {
|
||||
var memory = new ArrayBuffer(1024);
|
||||
var memory_float64 = new Float64Array(memory);
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestFloatHeapAccess.toString(), null, memory);
|
||||
TestFloatHeapAccess.toString(), stdlib, null, memory);
|
||||
assertEquals(1, module.caller());
|
||||
assertEquals(9.0, memory_float64[1]);
|
||||
}
|
||||
@ -708,7 +710,8 @@ function TestNamedFunctions() {
|
||||
add:add};
|
||||
}
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(TestNamedFunctions.toString());
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestNamedFunctions.toString(), stdlib);
|
||||
module.init();
|
||||
assertEquals(77.5, module.add());
|
||||
})();
|
||||
@ -728,7 +731,8 @@ function TestGlobalsWithInit() {
|
||||
return {add:add};
|
||||
}
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(TestGlobalsWithInit.toString());
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestGlobalsWithInit.toString(), stdlib);
|
||||
assertEquals(77.5, module.add());
|
||||
})();
|
||||
|
||||
@ -865,7 +869,7 @@ function TestInitFunctionWithNoGlobals() {
|
||||
}
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestInitFunctionWithNoGlobals.toString());
|
||||
TestInitFunctionWithNoGlobals.toString(), stdlib);
|
||||
assertEquals(51, module.caller());
|
||||
})();
|
||||
|
||||
@ -879,7 +883,7 @@ function TestExportNameDifferentFromFunctionName() {
|
||||
}
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestExportNameDifferentFromFunctionName.toString());
|
||||
TestExportNameDifferentFromFunctionName.toString(), stdlib);
|
||||
assertEquals(55, module.alt_caller());
|
||||
})();
|
||||
|
||||
@ -975,7 +979,8 @@ function TestFunctionTable() {
|
||||
return {caller:caller};
|
||||
}
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(TestFunctionTable.toString());
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
TestFunctionTable.toString(), stdlib);
|
||||
assertEquals(55, module.caller(0, 0, 33, 22));
|
||||
assertEquals(11, module.caller(0, 1, 33, 22));
|
||||
assertEquals(9, module.caller(0, 2, 54, 45));
|
||||
@ -1021,8 +1026,8 @@ function TestForeignFunctions() {
|
||||
|
||||
var foreign = new ffi(23);
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(AsmModule.toString(),
|
||||
foreign, null);
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
AsmModule.toString(), stdlib, foreign, null);
|
||||
|
||||
assertEquals(103, module.caller(23, 103));
|
||||
}
|
||||
@ -1060,8 +1065,8 @@ function TestForeignFunctionMultipleUse() {
|
||||
|
||||
var foreign = new ffi();
|
||||
|
||||
var module = Wasm.instantiateModuleFromAsm(AsmModule.toString(),
|
||||
foreign, null);
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
AsmModule.toString(), stdlib, foreign, null);
|
||||
|
||||
assertEquals(89, module.caller(83, 83.25));
|
||||
}
|
||||
@ -1100,7 +1105,7 @@ function TestForeignVariables() {
|
||||
function TestCase(env, i1, f1, i2, f2) {
|
||||
print("Testing foreign variables...");
|
||||
var module = Wasm.instantiateModuleFromAsm(
|
||||
AsmModule.toString(), env);
|
||||
AsmModule.toString(), stdlib, env);
|
||||
assertEquals(i1, module.geti1());
|
||||
assertEquals(f1, module.getf1());
|
||||
assertEquals(i2, module.geti2());
|
||||
@ -1192,7 +1197,7 @@ TestForeignVariables();
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
TestByteHeapAccessCompat.toString());
|
||||
TestByteHeapAccessCompat.toString(), stdlib);
|
||||
m.store(0, 20);
|
||||
m.store(4, 21);
|
||||
m.store(8, 22);
|
||||
@ -1241,7 +1246,8 @@ assertWasm(15, TestGlobalBlock, { x: 4, y: 11 });
|
||||
return {ifunc: ifunc, dfunc: dfunc};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(CommaModule.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
CommaModule.toString(), stdlib);
|
||||
assertEquals(123, m.ifunc(456.7, 123));
|
||||
assertEquals(123.4, m.dfunc(456, 123.4));
|
||||
})();
|
||||
@ -1311,7 +1317,8 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
Module.toString(), stdlib);
|
||||
assertEquals(3, m.func());
|
||||
})();
|
||||
|
||||
@ -1330,7 +1337,8 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
Module.toString(), stdlib);
|
||||
assertEquals(3, m.func());
|
||||
})();
|
||||
|
||||
@ -1348,7 +1356,8 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
Module.toString(), stdlib);
|
||||
assertEquals(1.23, m.func());
|
||||
});
|
||||
|
||||
@ -1363,7 +1372,8 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(
|
||||
Module.toString(), stdlib);
|
||||
assertEquals(7, m.func());
|
||||
})();
|
||||
|
||||
@ -1379,7 +1389,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1395,7 +1405,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1410,7 +1420,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1425,7 +1435,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1443,7 +1453,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
assertEquals(3, m.func());
|
||||
})();
|
||||
|
||||
@ -1459,7 +1469,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
assertEquals(-34359738370.75, m.func());
|
||||
})();
|
||||
|
||||
@ -1476,7 +1486,7 @@ assertWasm(1, TestXor);
|
||||
}
|
||||
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1493,7 +1503,7 @@ assertWasm(1, TestXor);
|
||||
return {func: func};
|
||||
}
|
||||
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString());
|
||||
var m = Wasm.instantiateModuleFromAsm(Module.toString(), stdlib);
|
||||
assertEquals(0, m.func());
|
||||
})();
|
||||
|
||||
@ -1508,7 +1518,7 @@ assertWasm(1, TestXor);
|
||||
}
|
||||
return { main : aaa };
|
||||
}
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString(), stdlib);
|
||||
assertEquals(1321347704, wasm.main());
|
||||
})();
|
||||
|
||||
@ -1533,7 +1543,7 @@ assertWasm(1, TestXor);
|
||||
u0x87654321: u0x87654321,
|
||||
};
|
||||
}
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString(), stdlib);
|
||||
assertEquals(0xffffffff, wasm.u0xffffffff());
|
||||
assertEquals(0x80000000, wasm.u0x80000000());
|
||||
assertEquals(0x87654321, wasm.u0x87654321());
|
||||
@ -1541,13 +1551,13 @@ assertWasm(1, TestXor);
|
||||
|
||||
(function TestBadNoDeclaration() {
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm('33;');
|
||||
Wasm.instantiateModuleFromAsm('33;', stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
(function TestBadVarDeclaration() {
|
||||
assertThrows(function() {
|
||||
Wasm.instantiateModuleFromAsm('var x = 3;');
|
||||
Wasm.instantiateModuleFromAsm('var x = 3;', stdlib);
|
||||
});
|
||||
})();
|
||||
|
||||
@ -1562,7 +1572,7 @@ assertWasm(1, TestXor);
|
||||
}
|
||||
return {main:main};
|
||||
}
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString(), stdlib);
|
||||
assertEquals(231, wasm.main());
|
||||
})();
|
||||
|
||||
@ -1598,6 +1608,6 @@ assertWasm(1, TestXor);
|
||||
}
|
||||
return {main:main};
|
||||
}
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString());
|
||||
var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString(), stdlib);
|
||||
assertEquals(323, wasm.main());
|
||||
})();
|
||||
|
@ -20102,7 +20102,7 @@ function b6() {
|
||||
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9, dynCall_iiii: dynCall_iiii, dynCall_viiiii: dynCall_viiiii, dynCall_vi: dynCall_vi, dynCall_vii: dynCall_vii, dynCall_ii: dynCall_ii, dynCall_viii: dynCall_viii, dynCall_v: dynCall_v, dynCall_viid: dynCall_viid, dynCall_viiiiii: dynCall_viiiiii, dynCall_iii: dynCall_iii, dynCall_iiiiii: dynCall_iiiiii, dynCall_viiii: dynCall_viiii };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_viiiii": invoke_viiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiiiii": invoke_viiiiii, "invoke_iii": invoke_iii, "invoke_iiiiii": invoke_iiiiii, "invoke_viiii": invoke_viiii, "___cxa_throw": ___cxa_throw, "_emscripten_run_script": _emscripten_run_script, "_cosf": _cosf, "_send": _send, "__ZSt9terminatev": __ZSt9terminatev, "__reallyNegative": __reallyNegative, "___cxa_is_number_type": ___cxa_is_number_type, "___assert_fail": ___assert_fail, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "_fflush": _fflush, "_pwrite": _pwrite, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "___cxa_begin_catch": ___cxa_begin_catch, "_sinf": _sinf, "_fileno": _fileno, "___resumeException": ___resumeException, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "_sysconf": _sysconf, "_clock": _clock, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_puts": _puts, "_mkport": _mkport, "_floorf": _floorf, "_sqrtf": _sqrtf, "_write": _write, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "__ZNSt9exceptionD2Ev": __ZNSt9exceptionD2Ev, "_printf": _printf, "___cxa_does_inherit": ___cxa_does_inherit, "__exit": __exit, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "_emscripten_cancel_main_loop": _emscripten_cancel_main_loop, "__formatString": __formatString, "_fputs": _fputs, "_exit": _exit, "___cxa_pure_virtual": ___cxa_pure_virtual, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity, "__ZTISt9exception": __ZTISt9exception }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_viiiii": invoke_viiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiiiii": invoke_viiiiii, "invoke_iii": invoke_iii, "invoke_iiiiii": invoke_iiiiii, "invoke_viiii": invoke_viiii, "___cxa_throw": ___cxa_throw, "_emscripten_run_script": _emscripten_run_script, "_cosf": _cosf, "_send": _send, "__ZSt9terminatev": __ZSt9terminatev, "__reallyNegative": __reallyNegative, "___cxa_is_number_type": ___cxa_is_number_type, "___assert_fail": ___assert_fail, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "_fflush": _fflush, "_pwrite": _pwrite, "___setErrNo": ___setErrNo, "_sbrk": _sbrk, "___cxa_begin_catch": ___cxa_begin_catch, "_sinf": _sinf, "_fileno": _fileno, "___resumeException": ___resumeException, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "_sysconf": _sysconf, "_clock": _clock, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_puts": _puts, "_mkport": _mkport, "_floorf": _floorf, "_sqrtf": _sqrtf, "_write": _write, "_emscripten_set_main_loop": _emscripten_set_main_loop, "___errno_location": ___errno_location, "__ZNSt9exceptionD2Ev": __ZNSt9exceptionD2Ev, "_printf": _printf, "___cxa_does_inherit": ___cxa_does_inherit, "__exit": __exit, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "_emscripten_cancel_main_loop": _emscripten_cancel_main_loop, "__formatString": __formatString, "_fputs": _fputs, "_exit": _exit, "___cxa_pure_virtual": ___cxa_pure_virtual, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity, "__ZTISt9exception": __ZTISt9exception }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -5770,7 +5770,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _memcpy: _memcpy, _main: _main, _memset: _memset, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array}, {"abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _memcpy = Module["_memcpy"] = asm["_memcpy"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -5777,7 +5777,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _memcpy: _memcpy, _main: _main, _memset: _memset, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _memcpy = Module["_memcpy"] = asm["_memcpy"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -8227,7 +8227,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_fflush": _fflush, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_putchar": _putchar, "_fputc": _fputc, "_send": _send, "_pwrite": _pwrite, "_abort": _abort, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_sbrk": _sbrk, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_printf": _printf, "_time": _time, "_sysconf": _sysconf, "_write": _write, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_fflush": _fflush, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_putchar": _putchar, "_fputc": _fputc, "_send": _send, "_pwrite": _pwrite, "_abort": _abort, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_sbrk": _sbrk, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_printf": _printf, "_time": _time, "_sysconf": _sysconf, "_write": _write, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -8394,7 +8394,7 @@ function b2() {
|
||||
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9, dynCall_ii: dynCall_ii, dynCall_vi: dynCall_vi, dynCall_v: dynCall_v };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_ii": invoke_ii, "invoke_vi": invoke_vi, "invoke_v": invoke_v, "_send": _send, "___setErrNo": ___setErrNo, "___cxa_is_number_type": ___cxa_is_number_type, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "_fflush": _fflush, "_time": _time, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "___resumeException": ___resumeException, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "___errno_location": ___errno_location, "__ZNSt9exceptionD2Ev": __ZNSt9exceptionD2Ev, "_fputc": _fputc, "___cxa_throw": ___cxa_throw, "_abort": _abort, "_fwrite": _fwrite, "___cxa_does_inherit": ___cxa_does_inherit, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity, "__ZTISt9exception": __ZTISt9exception, "__ZTVN10__cxxabiv120__si_class_type_infoE": __ZTVN10__cxxabiv120__si_class_type_infoE }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array}, {"abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_ii": invoke_ii, "invoke_vi": invoke_vi, "invoke_v": invoke_v, "_send": _send, "___setErrNo": ___setErrNo, "___cxa_is_number_type": ___cxa_is_number_type, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "_fflush": _fflush, "_time": _time, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "___resumeException": ___resumeException, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "___errno_location": ___errno_location, "__ZNSt9exceptionD2Ev": __ZNSt9exceptionD2Ev, "_fputc": _fputc, "___cxa_throw": ___cxa_throw, "_abort": _abort, "_fwrite": _fwrite, "___cxa_does_inherit": ___cxa_does_inherit, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity, "__ZTISt9exception": __ZTISt9exception, "__ZTVN10__cxxabiv120__si_class_type_infoE": __ZTVN10__cxxabiv120__si_class_type_infoE }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -40879,7 +40879,7 @@ function b1(i1) {
|
||||
return { _testSetjmp: _testSetjmp, _i64Subtract: _i64Subtract, _free: _free, _main: _main, _rand_r: _rand_r, _realloc: _realloc, _i64Add: _i64Add, _tolower: _tolower, _saveSetjmp: _saveSetjmp, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _strlen: _strlen, _rand: _rand, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9, dynCall_iiii: dynCall_iiii, dynCall_vi: dynCall_vi, dynCall_vii: dynCall_vii, dynCall_ii: dynCall_ii, dynCall_iiiii: dynCall_iiiii, dynCall_iii: dynCall_iii };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_iiiii": invoke_iiiii, "invoke_iii": invoke_iii, "_isalnum": _isalnum, "_fabs": _fabs, "_frexp": _frexp, "_exp": _exp, "_fread": _fread, "__reallyNegative": __reallyNegative, "_longjmp": _longjmp, "__addDays": __addDays, "_fsync": _fsync, "_signal": _signal, "_rename": _rename, "_sbrk": _sbrk, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_sinh": _sinh, "_sysconf": _sysconf, "_close": _close, "_ferror": _ferror, "_clock": _clock, "_cos": _cos, "_tanh": _tanh, "_unlink": _unlink, "_write": _write, "__isLeapYear": __isLeapYear, "_ftell": _ftell, "_isupper": _isupper, "_gmtime_r": _gmtime_r, "_islower": _islower, "_tmpnam": _tmpnam, "_tmpfile": _tmpfile, "_send": _send, "_abort": _abort, "_setvbuf": _setvbuf, "_atan2": _atan2, "_setlocale": _setlocale, "_isgraph": _isgraph, "_modf": _modf, "_strerror_r": _strerror_r, "_fscanf": _fscanf, "___setErrNo": ___setErrNo, "_isalpha": _isalpha, "_srand": _srand, "_mktime": _mktime, "_putchar": _putchar, "_gmtime": _gmtime, "_localeconv": _localeconv, "_sprintf": _sprintf, "_localtime": _localtime, "_read": _read, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "_exit": _exit, "_freopen": _freopen, "_llvm_pow_f64": _llvm_pow_f64, "_fgetc": _fgetc, "_fmod": _fmod, "_lseek": _lseek, "_rmdir": _rmdir, "_asin": _asin, "_floor": _floor, "_pwrite": _pwrite, "_localtime_r": _localtime_r, "_tzset": _tzset, "_open": _open, "_remove": _remove, "_snprintf": _snprintf, "__scanString": __scanString, "_strftime": _strftime, "_fseek": _fseek, "_iscntrl": _iscntrl, "_isxdigit": _isxdigit, "_fclose": _fclose, "_log": _log, "_recv": _recv, "_tan": _tan, "_copysign": _copysign, "__getFloat": __getFloat, "_fputc": _fputc, "_ispunct": _ispunct, "_ceil": _ceil, "_isspace": _isspace, "_fopen": _fopen, "_sin": _sin, "_acos": _acos, "_cosh": _cosh, "___buildEnvironment": ___buildEnvironment, "_difftime": _difftime, "_ungetc": _ungetc, "_system": _system, "_fflush": _fflush, "_log10": _log10, "_fileno": _fileno, "__exit": __exit, "__arraySum": __arraySum, "_fgets": _fgets, "_atan": _atan, "_pread": _pread, "_mkport": _mkport, "_toupper": _toupper, "_feof": _feof, "___errno_location": ___errno_location, "_clearerr": _clearerr, "_getenv": _getenv, "_strerror": _strerror, "_emscripten_longjmp": _emscripten_longjmp, "__formatString": __formatString, "_fputs": _fputs, "_sqrt": _sqrt, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "___rand_seed": ___rand_seed, "NaN": NaN, "Infinity": Infinity, "_stderr": _stderr, "_stdin": _stdin, "_stdout": _stdout }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_iiiii": invoke_iiiii, "invoke_iii": invoke_iii, "_isalnum": _isalnum, "_fabs": _fabs, "_frexp": _frexp, "_exp": _exp, "_fread": _fread, "__reallyNegative": __reallyNegative, "_longjmp": _longjmp, "__addDays": __addDays, "_fsync": _fsync, "_signal": _signal, "_rename": _rename, "_sbrk": _sbrk, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_sinh": _sinh, "_sysconf": _sysconf, "_close": _close, "_ferror": _ferror, "_clock": _clock, "_cos": _cos, "_tanh": _tanh, "_unlink": _unlink, "_write": _write, "__isLeapYear": __isLeapYear, "_ftell": _ftell, "_isupper": _isupper, "_gmtime_r": _gmtime_r, "_islower": _islower, "_tmpnam": _tmpnam, "_tmpfile": _tmpfile, "_send": _send, "_abort": _abort, "_setvbuf": _setvbuf, "_atan2": _atan2, "_setlocale": _setlocale, "_isgraph": _isgraph, "_modf": _modf, "_strerror_r": _strerror_r, "_fscanf": _fscanf, "___setErrNo": ___setErrNo, "_isalpha": _isalpha, "_srand": _srand, "_mktime": _mktime, "_putchar": _putchar, "_gmtime": _gmtime, "_localeconv": _localeconv, "_sprintf": _sprintf, "_localtime": _localtime, "_read": _read, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "_exit": _exit, "_freopen": _freopen, "_llvm_pow_f64": _llvm_pow_f64, "_fgetc": _fgetc, "_fmod": _fmod, "_lseek": _lseek, "_rmdir": _rmdir, "_asin": _asin, "_floor": _floor, "_pwrite": _pwrite, "_localtime_r": _localtime_r, "_tzset": _tzset, "_open": _open, "_remove": _remove, "_snprintf": _snprintf, "__scanString": __scanString, "_strftime": _strftime, "_fseek": _fseek, "_iscntrl": _iscntrl, "_isxdigit": _isxdigit, "_fclose": _fclose, "_log": _log, "_recv": _recv, "_tan": _tan, "_copysign": _copysign, "__getFloat": __getFloat, "_fputc": _fputc, "_ispunct": _ispunct, "_ceil": _ceil, "_isspace": _isspace, "_fopen": _fopen, "_sin": _sin, "_acos": _acos, "_cosh": _cosh, "___buildEnvironment": ___buildEnvironment, "_difftime": _difftime, "_ungetc": _ungetc, "_system": _system, "_fflush": _fflush, "_log10": _log10, "_fileno": _fileno, "__exit": __exit, "__arraySum": __arraySum, "_fgets": _fgets, "_atan": _atan, "_pread": _pread, "_mkport": _mkport, "_toupper": _toupper, "_feof": _feof, "___errno_location": ___errno_location, "_clearerr": _clearerr, "_getenv": _getenv, "_strerror": _strerror, "_emscripten_longjmp": _emscripten_longjmp, "__formatString": __formatString, "_fputs": _fputs, "_sqrt": _sqrt, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "___rand_seed": ___rand_seed, "NaN": NaN, "Infinity": Infinity, "_stderr": _stderr, "_stdin": _stdin, "_stdout": _stdout }, buffer);
|
||||
var _testSetjmp = Module["_testSetjmp"] = asm["_testSetjmp"];
|
||||
var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
|
@ -7879,7 +7879,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_fflush": _fflush, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_abort": _abort, "___setErrNo": ___setErrNo, "_fwrite": _fwrite, "_sbrk": _sbrk, "_time": _time, "_mkport": _mkport, "__reallyNegative": __reallyNegative, "__formatString": __formatString, "_fileno": _fileno, "_write": _write, "_fprintf": _fprintf, "_sysconf": _sysconf, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_fflush": _fflush, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_abort": _abort, "___setErrNo": ___setErrNo, "_fwrite": _fwrite, "_sbrk": _sbrk, "_time": _time, "_mkport": _mkport, "__reallyNegative": __reallyNegative, "__formatString": __formatString, "_fileno": _fileno, "_write": _write, "_fprintf": _fprintf, "_sysconf": _sysconf, "___errno_location": ___errno_location, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -5778,7 +5778,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _memcpy: _memcpy, _main: _main, _memset: _memset, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_sqrtf": _sqrtf, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_sqrtf": _sqrtf, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _memcpy = Module["_memcpy"] = asm["_memcpy"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
@ -14541,7 +14541,7 @@ function stackSave() {
|
||||
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9, dynCall_iiii: dynCall_iiii, dynCall_vii: dynCall_vii, dynCall_iii: dynCall_iii };
|
||||
}).toString(),
|
||||
// EMSCRIPTEN_END_ASM
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "_send": _send, "___setErrNo": ___setErrNo, "___assert_fail": ___assert_fail, "_fflush": _fflush, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "___errno_location": ___errno_location, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "_llvm_bswap_i32": _llvm_bswap_i32, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_iiii": invoke_iiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "_send": _send, "___setErrNo": ___setErrNo, "___assert_fail": ___assert_fail, "_fflush": _fflush, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "___errno_location": ___errno_location, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "_llvm_bswap_i32": _llvm_bswap_i32, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer);
|
||||
var _strlen = Module["_strlen"] = asm["_strlen"];
|
||||
var _free = Module["_free"] = asm["_free"];
|
||||
var _main = Module["_main"] = asm["_main"];
|
||||
|
Loading…
Reference in New Issue
Block a user