summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/asm/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs
index 22b46e6aca..f5501a4bc7 100644
--- a/yjit/src/asm/mod.rs
+++ b/yjit/src/asm/mod.rs
@@ -220,6 +220,8 @@ impl CodeBlock {
/// Allocate a new label with a given name
pub fn new_label(&mut self, name: String) -> usize {
+ assert!(!name.contains(" "), "use underscores in label names, not spaces");
+
// This label doesn't have an address yet
self.label_addrs.push(0);
self.label_names.push(name);