Skip to content

How to use std library #44

@pannous

Description

@pannous

sorry, how do I use 'lib' flag?

asc test.ts  --lib /assemblyscript/std/portable/
ERROR TS2304: Cannot find name 'allocate_memory'.
 	var x=new Test()


asc test.ts  --lib /assemblyscript/std/

<--- Last few GCs --->

[32451:0x3d15dd0]    13131 ms: Mark-sweep 1278.0 (1329.7) -> 1278.0 (1339.7) MB, 876.9 / 0.0 ms  allocation failure GC in old space requested
[32451:0x3d15dd0]    14015 ms: Mark-sweep 1278.0 (1339.7) -> 1278.0 (1303.2) MB, 883.4 / 0.0 ms  last resort GC in old space requested
[32451:0x3d15dd0]    14882 ms: Mark-sweep 1278.0 (1303.2) -> 1278.0 (1303.2) MB, 866.8 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x22f669425529 <JSObject>
    1: /* anonymous */ [/opt/wasm/assemblyscript/dist/assemblyscript.js:~1] [pc=0xef89d1a870d](this=0x2181f4708ed1 <t map = 0xaab3fd8be11>,e=0x105a15ac1459 <t map = 0xaab3fd8c809>)
    2: /* anonymous */ [/opt/wasm/assemblyscript/dist/assemblyscript.js:~1] [pc=0xef89d1aaf44](this=0x2181f4708ed1 <t map = 0xaab3fd8be11>,e=0x105a15ac1459 <t map = 0xaab3fd8c809>,t=0x3bf00bf822d1 <undefined>)
    3: ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x8cea7c [node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewUninitializedFixedArray(int) [node]
 6: 0xd88283 [node]
 7: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 8: 0xef89d0042fd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions