fix comptime eval
This commit is contained in:
parent
96863e0397
commit
0994f4b187
|
@ -1528,10 +1528,9 @@ impl Ast {
|
|||
let is_comptime = match tag {
|
||||
Tag::Parameter => false,
|
||||
// TODO: figure out if there are function protos that arent const
|
||||
Tag::FunctionProto => true,
|
||||
Tag::FunctionDecl | Tag::Block | Tag::BlockTrailingExpr => {
|
||||
are_children_comptime(self, cache)
|
||||
}
|
||||
// Tag::FunctionProto | Tag::FunctionDecl | Tag::Block | Tag::BlockTrailingExpr => {
|
||||
// are_children_comptime(self, cache)
|
||||
// }
|
||||
Tag::Constant => true,
|
||||
Tag::ReturnStmt => true,
|
||||
Tag::ReturnExprStmt => are_children_comptime(self, cache),
|
||||
|
@ -1548,7 +1547,7 @@ impl Ast {
|
|||
| Tag::PointerType
|
||||
| Tag::ArrayType
|
||||
| Tag::TypeDeclRef => true,
|
||||
Tag::CallExpr => are_children_comptime(self, cache),
|
||||
// Tag::CallExpr => are_children_comptime(self, cache),
|
||||
// Tag::FieldAccess => {
|
||||
// let parent = data.as_index_intern().0;
|
||||
// cache.mark_as_dominated_by(index, parent);
|
||||
|
@ -2253,7 +2252,7 @@ pub mod ast_gen {
|
|||
let extra_nodes = cache
|
||||
.inner
|
||||
.iter()
|
||||
.filter(|(i, b)| **b)
|
||||
.filter(|(_, b)| **b)
|
||||
.filter_map(|(i, _)| {
|
||||
(!node_map.contains(i)).then(|| node_map.push(*i))
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue