Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: make injectdestructors a MIR pass #450

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/ast/ast_query.nim
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ const
PersistentNodeFlags*: TNodeFlags = {nfBase2, nfBase8, nfBase16,
nfDotSetter, nfDotField,
nfIsRef, nfIsPtr, nfPreventCg, nfLL,
nfFromTemplate, nfDefaultRefsParam,
nfLastRead, nfFirstWrite}
nfFromTemplate, nfDefaultRefsParam}

namePos* = 0 ## Name of the type/proc-like node
patternPos* = 1 ## empty except for term rewriting macros
Expand Down
3 changes: 0 additions & 3 deletions compiler/ast/ast_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ type
sfNeverRaises ## proc can never raise an exception, not even
## OverflowDefect or out-of-memory
sfUsedInFinallyOrExcept ## symbol is used inside an 'except' or 'finally'
sfSingleUsedTemp ## For temporaries that we know will only be used once
sfNoalias ## 'noalias' annotation, means C's 'restrict'
sfEffectsDelayed ## an 'effectsDelayed' parameter

Expand Down Expand Up @@ -500,8 +499,6 @@ type
nfDefaultParam ## an automatically inserter default parameter
nfDefaultRefsParam ## a default param value references another parameter
## the flag is applied to proc default values and to calls
nfLastRead ## this node is a last read
nfFirstWrite## this node is a first write
nfHasComment ## node has a comment
nfImplicitPragma ## node is a "singlePragma" this is a transition flag
## created as part of nkError refactoring for the pragmas
Expand Down
1 change: 0 additions & 1 deletion compiler/ast/report_enums.nim
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,6 @@ type
rsemUnsafeSetLen = "UnsafeSetLen"
rsemUnsafeDefault = "UnsafeDefault"
rsemBindDeprecated
rsemUncollectableRefCycle = "CycleCreated"
rsemObservableStores = "ObservableStores"
rsemCaseTransition = "CaseTransition"
rsemUseOfGc = "GcMem" # last !
Expand Down
3 changes: 0 additions & 3 deletions compiler/ast/reports_sem.nim
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ type
of rsemXCannotRaiseY:
raisesList*: PNode

of rsemUncollectableRefCycle:
cycleField*: PNode

of rsemStrictNotNilExpr, rsemStrictNotNilResult:
nilIssue*: Nilability
nilHistory*: seq[SemNilHistory]
Expand Down
7 changes: 0 additions & 7 deletions compiler/front/cli_reporter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1909,13 +1909,6 @@ proc reportBody*(conf: ConfigRef, r: SemReport): string =
of rsemObservableStores:
result = "observable stores to '$1'" % r.ast.render

of rsemUncollectableRefCycle:
if r.cycleField == nil:
result = "'$#' creates an uncollectable ref cycle" % [r.ast.render]
else:
result = "'$#' creates an uncollectable ref cycle; annotate '$#' with .cursor" % [
r.ast.render, r.cycleField.render]

of rsemResultUsed:
result = "used 'result' variable"

Expand Down
Loading