YJIT: add assertion wrt label names (#6459)
Add assertion wrt label names
This commit is contained in:
parent
8fcbb79742
commit
a58cbddd57
Notes:
git
2022-09-28 08:28:03 +09:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user