aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/codegen.rs5
-rw-r--r--macros/src/codegen/dispatchers.rs2
-rw-r--r--macros/src/codegen/idle.rs2
-rw-r--r--macros/src/codegen/init.rs8
-rw-r--r--macros/src/codegen/post_init.rs7
5 files changed, 13 insertions, 11 deletions
diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs
index 7d0d1220..80e65cd4 100644
--- a/macros/src/codegen.rs
+++ b/macros/src/codegen.rs
@@ -39,7 +39,8 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
let (const_app_init, root_init, user_init, call_init) =
init::codegen(core, app, analysis, extra);
- let (const_app_post_init, post_init_stmts) = post_init::codegen(core, &app, analysis, extra);
+ let (const_app_post_init, post_init_stmts) =
+ post_init::codegen(core, &app, analysis, extra);
let (const_app_idle, root_idle, user_idle, call_idle) =
idle::codegen(core, app, analysis, extra);
@@ -74,6 +75,8 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
#section
#cfg_core
unsafe extern "C" fn #main() -> ! {
+ let _TODO: () = ();
+
#(#assertion_stmts)*
#(#pre_init_stmts)*
diff --git a/macros/src/codegen/dispatchers.rs b/macros/src/codegen/dispatchers.rs
index 9a9cb102..1400786b 100644
--- a/macros/src/codegen/dispatchers.rs
+++ b/macros/src/codegen/dispatchers.rs
@@ -141,7 +141,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
#let_instant
#fq.split().0.enqueue_unchecked(index);
let priority = &rtfm::export::Priority::new(PRIORITY);
- #name(
+ crate::#name(
#locals_new
#name::Context::new(priority #instant)
#(,#pats)*
diff --git a/macros/src/codegen/idle.rs b/macros/src/codegen/idle.rs
index 35a72523..72432f67 100644
--- a/macros/src/codegen/idle.rs
+++ b/macros/src/codegen/idle.rs
@@ -72,7 +72,7 @@ pub fn codegen(
));
let locals_new = locals_new.iter();
- let call_idle = quote!(#name(
+ let call_idle = quote!(crate::#name(
#(#locals_new,)*
#name::Context::new(&rtfm::export::Priority::new(0))
));
diff --git a/macros/src/codegen/init.rs b/macros/src/codegen/init.rs
index f7e4674e..534b79b0 100644
--- a/macros/src/codegen/init.rs
+++ b/macros/src/codegen/init.rs
@@ -47,9 +47,9 @@ pub fn codegen(
let cfgs = &app.late_resources[name].cfgs;
quote!(
- #(#cfgs)*
- pub #name: #ty
- )
+ #(#cfgs)*
+ pub #name: #ty
+ )
})
.collect::<Vec<_>>()
})
@@ -109,7 +109,7 @@ pub fn codegen(
let locals_new = locals_new.iter();
let call_init =
- Some(quote!(let late = #name(#(#locals_new,)* #name::Context::new(core.into()));));
+ Some(quote!(let late = crate::#name(#(#locals_new,)* #name::Context::new(core.into()));));
root_init.push(module::codegen(Context::Init(core), needs_lt, app, extra));
diff --git a/macros/src/codegen/post_init.rs b/macros/src/codegen/post_init.rs
index 8578d5ac..b816e072 100644
--- a/macros/src/codegen/post_init.rs
+++ b/macros/src/codegen/post_init.rs
@@ -16,16 +16,15 @@ pub fn codegen(
// initialize late resources
if let Some(late_resources) = analysis.late_resources.get(&core) {
-
for name in late_resources {
// if it's live
let cfgs = app.late_resources[name].cfgs.clone();
if analysis.locations.get(name).is_some() {
// Need to also include the cfgs
stmts.push(quote!(
- #(#cfgs)*
- #name.as_mut_ptr().write(late.#name);
- ));
+ #(#cfgs)*
+ #name.as_mut_ptr().write(late.#name);
+ ));
}
}
}
/> Jarred Sumner 1-4/+4 2023-07-28Update nodejs-apis.mdGravatar Jarred Sumner 1-5/+5 2023-07-28Defer task destructionbun-v0.7.1Gravatar Jarred Sumner 1-1/+17 2023-07-28Stat largefile test (#3870)Gravatar Jarred Sumner 1-0/+22 * Add test for stat on a large file * Update fs.test.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-28Ignore when printing to stdout errors (#3869)Gravatar Jarred Sumner 1-2/+4 Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-28Fix bug with `/path/to/absolute/bun.lockb`Gravatar Jarred Sumner 1-10/+13 2023-07-28markBindingGravatar Dylan Conway 1-0/+1 2023-07-28optional parameterGravatar Dylan Conway 1-3/+3 2023-07-28Fixes #3868Gravatar Jarred Sumner 1-2/+3 Fixes #3868 Fixes #849 2023-07-28Fix assertion failure and possible infinite loop when printing as yarn lock ↵Gravatar Jarred Sumner 2-3/+16 files 2023-07-28Mark broken test as todoGravatar Jarred Sumner 2-1/+5 2023-07-28fix types and add message channel/port gc testGravatar Dylan Conway 2-62/+18 2023-07-28`MessageChannel` and `MessagePort` (#3860)Gravatar Dylan Conway 57-247/+3752 * copy and format * copy * copy * cleanup * some tests * spellcheck * add types * don't lock getting contextId * array buffer test 2023-07-28mark tests as todoGravatar Jarred Sumner 2-81/+75 2023-07-28add fork to child_process (#3851)Gravatar Vlad Sirenko 7-19/+446 * add fork to child_process * fix export * add test to child_process method `fork` * fmt fork * remove only from test 2023-07-28feat(bun/test): Impl. expect().pass() & expect().fail() (#3843)Gravatar Tiramify (A.K. Daniel) 6-5/+212 * Impl. pass & fail * fix * fix 2 * smol 2023-07-28fix the chunk boundary (`node:stream:createReadStream`) (#3853)Gravatar Ai Hoshino 3-8/+90 * fix the slice boundary. Close: #3668 * Add more boundary test case. * fix end is 0. 2023-07-28Support file: URLs in `fetch` (#3858)Gravatar Jarred Sumner 6-183/+281 * Support file: URLs in `fetch` * Update url.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-28fix(tls) exposes native canonicalizeIP and fix rootCertificates (#3866)Gravatar Ciro Spaciari 7-29/+125 * exposes native canonicalizeIP * remove unintended duplicate * add tests * add tests for debug builds * add rootCertificates test and fix len * just randomize test ids on prisma * remove work around and bump usockets with the actual fix * fix case * bump uws 2023-07-28Fixes #3795 (#3856)Gravatar Jarred Sumner 11-6/+140 Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-28Add todoGravatar Jarred Sumner 2-0/+8 cc @cirospaciari 2023-07-28Update pull_request_template.mdGravatar Jarred Sumner 1-1/+1 2023-07-28Update pull_request_template.mdGravatar Jarred Sumner 1-11/+16 2023-07-27Fix bug with // @bun annotation in main thread (#3855)Gravatar Jarred Sumner 4-2/+53 * Uncomment test * Fix bug with // @bun + async transpiler --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-27Add `Bun.isMainThread`Gravatar Jarred Sumner 7-3/+48 2023-07-27Uncomment testGravatar Jarred Sumner 1-1/+1 2023-07-27Resolve watch directories outside main thread + async iterator and symlink ↵Gravatar Ciro Spaciari 8-197/+523 fixes (#3846) * linux working pending tests with FSEvents * add more tests, fix async iterator * remove unnecessary check * fix macos symlink on directories * remove indirection layer * todos * fixes and some permission test * fix opsie and make prisma test more reliable * rebase with main * add comptime check for macOS * oops * oops2 * fix symlinks cascade on FSEvents * use JSC.WorkPool * use withResolver, createFIFO and fix close event on async iterator * remove unused events --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-1/+1 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-1/+1 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-1/+1 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-2/+2 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-0/+4 2023-07-27Update pull_request_template.mdGravatar Jarred Sumner 1-5/+11