Fix builds.
This commit is contained in:
parent
243e04f5ab
commit
2034ddd830
@ -2974,18 +2974,13 @@ impl Engine {
|
|||||||
let stack = state.stack.as_mut().unwrap();
|
let stack = state.stack.as_mut().unwrap();
|
||||||
|
|
||||||
let existing = if !hit_barrier && existing > 0 {
|
let existing = if !hit_barrier && existing > 0 {
|
||||||
let offset = stack.len() - existing;
|
match stack.len() - existing {
|
||||||
|
|
||||||
if !stack.get_entry_by_index(offset).2.is_empty() {
|
|
||||||
// Variable has been aliased
|
// Variable has been aliased
|
||||||
None
|
#[cfg(not(feature = "no_module"))]
|
||||||
} else {
|
offset if !stack.get_entry_by_index(offset).2.is_empty() => None,
|
||||||
if offset < state.block_stack_len {
|
|
||||||
// Defined in parent block
|
// Defined in parent block
|
||||||
None
|
offset if offset < state.block_stack_len => None,
|
||||||
} else {
|
offset => Some(offset),
|
||||||
Some(offset)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@ -2999,6 +2994,7 @@ impl Engine {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "no_module"))]
|
||||||
if is_export {
|
if is_export {
|
||||||
stack.add_alias_by_index(stack.len() - 1, name.clone());
|
stack.add_alias_by_index(stack.len() - 1, name.clone());
|
||||||
}
|
}
|
||||||
|
@ -641,6 +641,8 @@ impl Scope<'_> {
|
|||||||
///
|
///
|
||||||
/// Panics if the index is out of bounds.
|
/// Panics if the index is out of bounds.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
#[must_use]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) fn get_entry_by_index(
|
pub(crate) fn get_entry_by_index(
|
||||||
&mut self,
|
&mut self,
|
||||||
index: usize,
|
index: usize,
|
||||||
|
Loading…
Reference in New Issue
Block a user