fix eval delete bindings#5344
Conversation
Test262 conformance changes
Fixed tests (20):Tested main commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5344 +/- ##
===========================================
+ Coverage 47.24% 60.05% +12.81%
===========================================
Files 476 566 +90
Lines 46892 63024 +16132
===========================================
+ Hits 22154 37851 +15697
- Misses 24738 25173 +435 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zhuzhu81998
left a comment
There was a problem hiding this comment.
i am not familiar with this part of the codebase, but this feels, kinda hacky?
are you sure this is not something that happens because of incompliance with spec somewhere?
Yeah, fair point. the current approach is not clean enough. The Test262 report also caught a regression around eval("var x=delete(x)") so I’ll rework this instead of trying to patch around it |
|
Let us know when this is ready to review, or close it and re-open a new PR :) |
|
this new changes moves deletability into the function environment itself, marks newly extended eval bindings as deletable, and re resolves stale deleted locators before assignment. this matches the EvalDeclarationInstantiation / CreateMutableBinding(name, true) behavior more directly |
|
Updated this now. The fix keeps deleted eval-created bindings in the function environment and uses a separate eval declaration var path, so normal var statements do not recreate deleted bindings. Tests:
|
|
@hansl its ready for review !! |
Fixes #5333.
Direct eval-created local
varand function bindings were not treated as deletable at runtime, sodeleteleft them visible and latervarinitialization could recreate them.This tracks deleted eval-created local bindings in function environments and avoids recreating them after deletion.
Tests: