Родитель
db39c2d533
Коммит
5c0b5a2f4f
|
@ -24,7 +24,7 @@ Current Trunk
|
|||
`EXPORTED_RUNTIME_METHODS`.
|
||||
- When building with `MAIN_MODULE=2` the linker will now automatically include
|
||||
any symbols required by side modules found on the command line. This means
|
||||
that for many users of `MAIN_MODULE=2` it should not longer be necessary to
|
||||
that for many users of `MAIN_MODULE=2` it should no longer be necessary to
|
||||
list explicit `EXPORTED_FUNCTIONS`. Also, users of `MAIN_MODULE=1` with
|
||||
dynamic linking (not dlopen) who list all side modules on the command line,
|
||||
should be able to switch to `MAIN_MODULE=2` and get a reduction in code size.
|
||||
|
|
|
@ -42,6 +42,8 @@ WASM_PAGE_SIZE = 65536
|
|||
|
||||
HEADER_SIZE = 8
|
||||
|
||||
LIMITS_HAS_MAX = 0x1
|
||||
|
||||
|
||||
def toLEB(num):
|
||||
return leb128.u.encode(num)
|
||||
|
@ -165,7 +167,7 @@ class Module:
|
|||
flags = self.readByte()
|
||||
initial = self.readULEB()
|
||||
maximum = 0
|
||||
if flags & 0x1:
|
||||
if flags & LIMITS_HAS_MAX:
|
||||
maximum = self.readULEB()
|
||||
return Limits(flags, initial, maximum)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче