winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.06k stars 198 forks source link

Compiler internal refactor: avoid duplicate types in the type system #1738

Open yoav-steinberg opened 1 year ago

yoav-steinberg commented 1 year ago

@yoav-steinberg in a comment in #1045 https://github.com/winglang/wing/pull/1045#discussion_r1062564349:

hmm, that's pretty cool, but then there's another issue of us creating a new type (and env) per resolve_reference which seems just wrong. Lets think of caching it in the original type (another RefCell? sure!).

The gist of it means that every time our compiler sees another container type (e.g. Array<num>) it creates a new type, instead of checking if this type already exists. This is an important optimization, which may also lead to errors in certain scenarios (not entirely sure which scenarios though).

github-actions[bot] commented 1 year ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] commented 6 months ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!