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

no ropes WIP #20433

Merged
merged 28 commits into from
Sep 27, 2022
Merged

no ropes WIP #20433

merged 28 commits into from
Sep 27, 2022

Conversation

Araq
Copy link
Member

@Araq Araq commented Sep 26, 2022

Improves memory consumption for bootstrapping by 100MB. Compile times are reduced by about 1 second.

@AmjadHD

This comment was marked as resolved.

compiler/jsgen.nim Outdated Show resolved Hide resolved
@AmjadHD

This comment was marked as resolved.

@Araq Araq merged commit ca1f3f3 into devel Sep 27, 2022
@Araq Araq deleted the araq-no-ropes2 branch September 27, 2022 08:57
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from ca1f3f3

Hint: mm: orc; threads: on; opt: speed; options: -d:release
164173 lines; 11.348s; 667.801MiB peakmem

capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
* refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite
* rewrote ccgcalls.nim
* refactored ccgexprs.nim
* ccgliterals: refactoring
* refactoring: code dealing with name mangling
* refactoring: getRecordFieldsAux
* ropes are strings (insert obscene joke here)
* optimize JS code gen
* optimizations and code improvements
* more optimizations
* final cleanups
Araq pushed a commit that referenced this pull request May 21, 2024
fixes #23627

```nim
type
  TestObj = object of RootObj

  TestTestObj = object of RootObj
    testo: TestObj

proc `=destroy`(x: TestTestObj) =
  echo "Destructor for TestTestObj"

proc testCaseT() =
  echo "\nTest Case T"
  let tt1 {.used.} = TestTestObj(testo: TestObj())
```

When generating const object fields, it's likely that
we need to generate type infos for the object, which may be an object
with
custom hooks. We need to generate potential consts in the hooks first.

#20433 changed the semantics of
initialization. It should evaluate`BracedInit` first.
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.

None yet

2 participants