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: top level variable back reference for the evaluator #1213

Merged

Conversation

Peefy
Copy link
Contributor

@Peefy Peefy commented Apr 10, 2024

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

Closes #247
Closes kcl-lang/kpm#241
Closes #1176

feat: top level variable back reference

2. What is the scope of this PR (e.g. component or file name):

  • kclvm/evaluator/src/context.rs
  • kclvm/evaluator/src/func.rs
  • kclvm/evaluator/src/lazy.rs
  • kclvm/evaluator/src/lib.rs
  • kclvm/evaluator/src/module.rs
  • kclvm/evaluator/src/node.rs
  • kclvm/evaluator/src/proxy.rs
  • kclvm/evaluator/src/schema.rs
  • kclvm/evaluator/src/scope.rs
  • kclvm/evaluator/src/ty.rs
  • kclvm/runner/benches/bench_runner.rs
  • kclvm/runner/src/assembler.rs
  • kclvm/runner/src/lib.rs
  • kclvm/runner/src/runner.rs
  • kclvm/runtime/src/value/val_func.rs

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other
  • kclvm/evaluator/src/snapshots/kclvm_evaluator__tests__lazy_scope_0.snap
  • kclvm/evaluator/src/snapshots/kclvm_evaluator__tests__lazy_scope_1.snap
  • kclvm/evaluator/src/snapshots/kclvm_evaluator__tests__lazy_scope_2.snap
  • kclvm/runner/src/tests.rs

Signed-off-by: peefy <xpf6677@163.com>
@Peefy Peefy added this to the v0.9.0 Release milestone Apr 10, 2024
@Peefy Peefy merged commit acb901d into kcl-lang:main Apr 10, 2024
7 of 8 checks passed
@Peefy Peefy deleted the feat-evaluator-top-level-variable-back-reference branch April 10, 2024 07:51
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 8627481438

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 246 of 271 (90.77%) changed or added relevant lines in 17 files are covered.
  • 2942 unchanged lines in 14 files lost coverage.
  • Overall coverage decreased (-1.4%) to 71.203%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/evaluator/src/func.rs 0 1 0.0%
kclvm/evaluator/src/proxy.rs 0 1 0.0%
kclvm/evaluator/src/ty.rs 10 11 90.91%
kclvm/runtime/src/value/val_func.rs 3 4 75.0%
kclvm/runner/src/lib.rs 7 9 77.78%
kclvm/evaluator/src/schema.rs 14 17 82.35%
kclvm/evaluator/src/lazy.rs 73 77 94.81%
kclvm/evaluator/src/scope.rs 50 55 90.91%
kclvm/evaluator/src/node.rs 22 29 75.86%
Files with Coverage Reduction New Missed Lines %
kclvm/runtime/src/value/val_func.rs 1 88.89%
kclvm/evaluator/src/scope.rs 1 89.89%
kclvm/sema/src/ty/unify.rs 1 97.81%
kclvm/ast/src/ast.rs 1 83.49%
kclvm/compiler/src/value/schema.rs 10 0.0%
kclvm/runner/src/runner.rs 13 89.43%
kclvm/compiler/src/codegen/llvm/backtrack.rs 16 0.0%
kclvm/config/src/cache.rs 17 89.55%
kclvm/compiler/src/codegen/llvm/utils.rs 20 63.64%
kclvm/compiler/src/codegen/llvm/module.rs 27 66.67%
Totals Coverage Status
Change from base Build 8617183262: -1.4%
Covered Lines: 46929
Relevant Lines: 65909

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants