mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 21:40:43 +00:00
8fe95c9963
- TableOperations lint now includes a warning for table.create(N, {}) (which is likely a mistake since the table is shared by all entries) - Type checker now type checks #v when v is a union - Parser now rejects sources that consists of a single unfinished long comment - Work around significant MSVC 2022 performance regression, bringing it more or less in line with MSVC 2019 - Compiler now predicts array size for newly allocated tables when the table is filled in a short loop - Small improvements in compilation throughput (~2% faster) - Implement paged sweeper for GC which improves sweep throughput 2-3x and reduces memory consumption by 8 bytes per object (once it is stabilized we will see additional 8 bytes per object of savings) - Improve Repl Tab completion - Repl now supports -i (interactive mode to run code in context of a script's environment) and -On (to control optimization flags)
19 lines
1.1 KiB
C
19 lines
1.1 KiB
C
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
// This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include "lobject.h"
|
|
|
|
#define sizeCclosure(n) (offsetof(Closure, c.upvals) + sizeof(TValue) * (n))
|
|
#define sizeLclosure(n) (offsetof(Closure, l.uprefs) + sizeof(TValue) * (n))
|
|
|
|
LUAI_FUNC Proto* luaF_newproto(lua_State* L);
|
|
LUAI_FUNC Closure* luaF_newLclosure(lua_State* L, int nelems, Table* e, Proto* p);
|
|
LUAI_FUNC Closure* luaF_newCclosure(lua_State* L, int nelems, Table* e);
|
|
LUAI_FUNC UpVal* luaF_findupval(lua_State* L, StkId level);
|
|
LUAI_FUNC void luaF_close(lua_State* L, StkId level);
|
|
LUAI_FUNC void luaF_freeproto(lua_State* L, Proto* f, struct lua_Page* page);
|
|
LUAI_FUNC void luaF_freeclosure(lua_State* L, Closure* c, struct lua_Page* page);
|
|
void luaF_unlinkupval(UpVal* uv);
|
|
LUAI_FUNC void luaF_freeupval(lua_State* L, UpVal* uv, struct lua_Page* page);
|
|
LUAI_FUNC const LocVar* luaF_getlocal(const Proto* func, int local_number, int pc);
|