зеркало из https://github.com/github/ruby.git
YJIT: add assertion wrt label names (#6459)
Add assertion wrt label names
This commit is contained in:
Родитель
8fcbb79742
Коммит
a58cbddd57
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче