-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native global v2 #209
Native global v2 #209
Conversation
e8d545c
to
2de67af
Compare
And use this type to load into the global Object Template
And implement global object inheritence
2de67af
to
d57c03c
Compare
src/engines/v8/v8.zig
Outdated
for (tpls, 0..) |tpl, i| { | ||
js_types[i] = @intFromPtr(tpl.tpl.handle); | ||
} | ||
self.nat_ctx.loadTypes(js_types); | ||
|
||
if (gen.GlobalType) |T| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of this root declaration. Is it better to have instead a declaration at the API definition level?
src/reflect.zig
Outdated
@@ -755,6 +756,10 @@ pub const Struct = struct { | |||
} | |||
} | |||
|
|||
pub fn is_global_type(comptime self: Struct) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
camelCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new style comptime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert comptime
Bind global object with native
Fix #171
Fix #203
Replace #208