Skip to content

Conversation

@Hzfengsy
Copy link
Member

Remove the deprecated s and n attributes from the Constant AST node class in the script parser. These attributes were previously used for string and numeric constants but are no longer needed in the current AST implementation.

Updated all code that creates Constant objects to remove the corresponding parameters:

  • Removed s and n parameters from Constant.__init__
  • Updated _FIELDS list to exclude deprecated attributes
  • Fixed calls in evaluator.py and parser.py to remove extra arguments

This change simplifies the AST structure and removes unused legacy code.

@Hzfengsy Hzfengsy changed the title Remove deprecated attributes from Constant AST node [Script] Remove deprecated attributes from Constant AST node Jun 17, 2025
Remove the deprecated `s` and `n` attributes from the `Constant` AST node
class in the script parser. These attributes were previously used for
string and numeric constants but are no longer needed in the current
AST implementation.

Updated all code that creates `Constant` objects to remove the
corresponding parameters:
- Removed `s` and `n` parameters from `Constant.__init__`
- Updated `_FIELDS` list to exclude deprecated attributes
- Fixed calls in `evaluator.py` and `parser.py` to remove extra arguments

This change simplifies the AST structure and removes unused legacy code.
@Hzfengsy Hzfengsy force-pushed the parser_remove_deprecated_attr branch from d85d5d3 to 36f7413 Compare June 17, 2025 03:44
@tqchen tqchen merged commit 43e7676 into apache:main Jun 17, 2025
13 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
…18066)

[ARITH] Remove deprecated attributes from Constant AST node

Remove the deprecated `s` and `n` attributes from the `Constant` AST node
class in the script parser. These attributes were previously used for
string and numeric constants but are no longer needed in the current
AST implementation.

Updated all code that creates `Constant` objects to remove the
corresponding parameters:
- Removed `s` and `n` parameters from `Constant.__init__`
- Updated `_FIELDS` list to exclude deprecated attributes
- Fixed calls in `evaluator.py` and `parser.py` to remove extra arguments

This change simplifies the AST structure and removes unused legacy code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants