mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
kit: implement server components dev server (#14025)
This commit is contained in:
@@ -48,6 +48,9 @@ pub const Index = packed struct(u32) {
|
||||
pub const invalid = Index{ .value = std.math.maxInt(Int) };
|
||||
pub const runtime = Index{ .value = 0 };
|
||||
|
||||
pub const kit_server_data = Index{ .value = 1 };
|
||||
pub const kit_client_data = Index{ .value = 2 };
|
||||
|
||||
pub const Int = u32;
|
||||
|
||||
pub inline fn source(num: anytype) Index {
|
||||
@@ -229,6 +232,8 @@ pub const Ref = packed struct(u64) {
|
||||
*const std.ArrayList(js_ast.Symbol) => symbol_table.items,
|
||||
*std.ArrayList(js_ast.Symbol) => symbol_table.items,
|
||||
[]js_ast.Symbol => symbol_table,
|
||||
*js_ast.Symbol.Map => return symbol_table.get(ref) orelse
|
||||
unreachable, // ref must exist within symbol table
|
||||
else => |T| @compileError("Unsupported type to Ref.getSymbol: " ++ @typeName(T)),
|
||||
};
|
||||
return &resolved_symbol_table[ref.innerIndex()];
|
||||
|
||||
Reference in New Issue
Block a user