arnodel / golua

A Lua compiler / runtime in Go
Apache License 2.0
93 stars 10 forks source link

Fix order of debug hooks and close actions #67

Closed arnodel closed 2 years ago

arnodel commented 2 years ago

This is unspecified behaviour in Lua 5.4. The Lua 5.4 Test Suite expects debug hooks on return statements to be executed after the pending to-be-closed actions have been performed.

This PR implements this (with a Lua test)

codecov[bot] commented 2 years ago

Codecov Report

Merging #67 (dadff97) into lua5.4 (b686ecb) will increase coverage by 0.17%. The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           lua5.4      #67      +/-   ##
==========================================
+ Coverage   86.99%   87.17%   +0.17%     
==========================================
  Files          93       93              
  Lines       10192    10201       +9     
==========================================
+ Hits         8867     8893      +26     
+ Misses       1043     1026      -17     
  Partials      282      282              
Impacted Files Coverage Δ
runtime/luacont.go 93.09% <92.85%> (+1.41%) :arrow_up:
runtime/debughooks.go 70.00% <0.00%> (+36.66%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b686ecb...dadff97. Read the comment docs.