removing spirv headers dependencies, reworking architecture
This commit is contained in:
41
src/Runtime.zig
git.filemode.normal_file
41
src/Runtime.zig
git.filemode.normal_file
@@ -0,0 +1,41 @@
|
||||
const std = @import("std");
|
||||
const spv = @import("spv.zig");
|
||||
|
||||
const SpvVoid = spv.SpvVoid;
|
||||
const SpvByte = spv.SpvByte;
|
||||
const SpvWord = spv.SpvWord;
|
||||
const SpvBool = spv.SpvBool;
|
||||
|
||||
const Module = @import("Module.zig");
|
||||
const WordIterator = @import("WordIterator.zig");
|
||||
|
||||
const Self = @This();
|
||||
|
||||
pub const CallError = error{
|
||||
Unreachable,
|
||||
Killed,
|
||||
Error,
|
||||
InitEnd,
|
||||
ExecEnd,
|
||||
};
|
||||
|
||||
module: *Module,
|
||||
it: WordIterator,
|
||||
stack_frames: std.SinglyLinkedList,
|
||||
|
||||
pub fn init(module: *Module) !Self {
|
||||
return .{
|
||||
.module = module,
|
||||
.it = module.it,
|
||||
.stack_frames = .{},
|
||||
};
|
||||
}
|
||||
|
||||
pub fn deinit(self: *const Self) void {
|
||||
_ = self;
|
||||
}
|
||||
|
||||
pub fn callEntryPoint(self: *Self, entry: SpvWord) CallError!void {
|
||||
_ = self;
|
||||
_ = entry;
|
||||
}
|
||||
Reference in New Issue
Block a user