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

feat: Memoization #827

Merged
merged 21 commits into from
Jan 25, 2024
Merged

feat: Memoization #827

merged 21 commits into from
Jan 25, 2024

Conversation

WinPlay02
Copy link
Contributor

  • memoizable function are now generated with runner_memoized_function_call
  • hidden parameters are inserted, if needed

Copy link

github-actions bot commented Jan 18, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ REPOSITORY git_diff yes no 0.08s
✅ TYPESCRIPT eslint 2 0 0 4.52s
✅ TYPESCRIPT prettier 2 0 0 1.16s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1e39300) 100.00% compared to head (05d3737) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #827    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           89        89            
  Lines        14065     14219   +154     
  Branches      2974      3009    +35     
==========================================
+ Hits         14065     14219   +154     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WinPlay02 WinPlay02 marked this pull request as ready for review January 22, 2024 02:42
@WinPlay02
Copy link
Contributor Author

Maybe it makes sense to move getPythonModuleOrDefault, getPythonNameOrDefault and getQualifiedNamePythonCompatible to other files, as they might be useful for other purposes?

@lars-reimann
Copy link
Member

Currently, I don't see other places than the code generator that would need to process @PythonName and @PythonModule. If that changes, we can move them to a common location.

Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small suggestion left.

WinPlay02 and others added 2 commits January 25, 2024 15:09
Co-authored-by: Lars Reimann <mail@larsreimann.com>
…oization

# Conflicts:
#	packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts
@lars-reimann lars-reimann merged commit d0a6c71 into main Jan 25, 2024
7 checks passed
@lars-reimann lars-reimann deleted the memoization branch January 25, 2024 14:31
lars-reimann pushed a commit that referenced this pull request Feb 12, 2024
## [0.7.0](v0.6.0...v0.7.0) (2024-02-12)

### Features

* apply type parameter substitutions of receiver type for member accesses ([#859](#859)) ([5780ed7](5780ed7)), closes [#23](#23)
* check position of usages of variant type parameters ([#852](#852)) ([a2672d7](a2672d7)), closes [#743](#743)
* check whether lower and upper bounds of a type parameter are compatible ([#885](#885)) ([2fc7fe6](2fc7fe6)), closes [#875](#875)
* check whether type parameter bounds are acyclic ([#886](#886)) ([bcf1a4b](bcf1a4b)), closes [#874](#874)
* check whether type parameter bounds are named types ([#878](#878)) ([d8b4168](d8b4168)), closes [#876](#876)
* error if type parameter has multiple lower/upper bounds ([#870](#870)) ([6035b76](6035b76)), closes [#867](#867)
* error if type parameter of class is used in static context ([#830](#830)) ([d5cf420](d5cf420)), closes [#809](#809)
* error if type parameters of functions are variant ([#869](#869)) ([9bf5fec](9bf5fec))
* handle type parameter types in type checker ([#884](#884)) ([6b6f738](6b6f738)), closes [#877](#877)
* handle type parameters (part 1) ([#856](#856)) ([8a35558](8a35558)), closes [#23](#23)
* improve type simplification ([#871](#871)) ([0daafb9](0daafb9))
* Memoization ([#827](#827)) ([d0a6c71](d0a6c71))
* null-safe call & indexed access ([#872](#872)) ([f1420a2](f1420a2)), closes [#857](#857) [#858](#858)
* optional type parameters ([#829](#829)) ([0e9f67a](0e9f67a)), closes [#739](#739)
* optionally generate code without runner integration ([#836](#836)) ([0ed9d6e](0ed9d6e)), closes [#831](#831)
* pre-load all relevant workspace files before executing pipeline ([#822](#822)) ([67ab766](67ab766))
* simplify computed types ([#866](#866)) ([bde3274](bde3274))
* simplify substitutions passed to `computeType` ([#873](#873)) ([aa444d4](aa444d4))
* substitute type parameters when checking assignability of overriding members ([#865](#865)) ([a1f24e0](a1f24e0)), closes [#862](#862)
* substitute type parameters when computing type of inherited members ([#864](#864)) ([33de1e8](33de1e8)), closes [#863](#863)
* support placeholder queries that only request a subset of data ([#826](#826)) ([1e39300](1e39300))
* type casts ([#838](#838)) ([66c3666](66c3666)), closes [#835](#835)

### Bug Fixes

* allow usage of covariant type parameters in own constructor ([#854](#854)) ([4ebae94](4ebae94))
* check for duplicate bounds if type parameters occur as right operand ([#882](#882)) ([8776ce0](8776ce0)), closes [#881](#881)
* generation of static class functions ([#832](#832)) ([57eac45](57eac45))
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.

3 participants