Skip to content

Commit

Permalink
remove folded_before_codegen attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Nov 16, 2023
1 parent 926fef6 commit 19b0102
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ class FoldedFunction(BuiltinFunction):
# Since foldable builtin functions are not folded before semantics validation,
# this flag is used for `check_variable_constancy` in semantics validation.
_kwargable = True
# Skip annotation of builtins if it will be folded before codegen
_always_folded_before_codegen = True


class TypenameFoldedFunction(FoldedFunction):
Expand Down Expand Up @@ -2289,9 +2287,6 @@ def build_IR(self, expr, args, kwargs, context):

class Empty(TypenameFoldedFunction):
_id = "empty"
# Since `empty` is not folded in the AST, `is_folded` is set to False
# so that it will be properly annotated.
_always_folded_before_codegen = False

def fetch_call_return(self, node):
type_ = self.infer_arg_types(node)[0].typedef
Expand Down
3 changes: 0 additions & 3 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,6 @@ def visit_Call(self, node: vy_ast.Call, typ: VyperType) -> None:
for arg, arg_type in zip(node.args, call_type.arg_types):
self.visit(arg, arg_type)
else:
if getattr(call_type, "_always_folded_before_codegen", False):
return

# builtin functions
arg_types = call_type.infer_arg_types(node, typ)
# `infer_arg_types` already calls `validate_expected_type`
Expand Down

0 comments on commit 19b0102

Please sign in to comment.