Commit 133cc49
committed
fix(compiler): only force OOG on failure paths, not success exits
OutOfGas is a generic-failure placeholder. STOP/RETURN/REVERT are not
errors and must keep their original InstructionResult codes; only
genuine failure paths (stack under/overflow, invalid jump, real OOG,
invalid opcode, etc.) collapse to the OOG constant.
This restores observable correctness: success paths now match the
interpreter, and the strict equality assertion in sanity_check works
again. Drops the relaxed comparison and the PreparedBench plumbing
introduced in the previous commit.1 parent f858fb7 commit 133cc49
3 files changed
Lines changed: 18 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 168 | + | |
180 | 169 | | |
181 | 170 | | |
182 | 171 | | |
| |||
207 | 196 | | |
208 | 197 | | |
209 | 198 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 199 | + | |
214 | 200 | | |
215 | 201 | | |
216 | 202 | | |
| |||
417 | 403 | | |
418 | 404 | | |
419 | 405 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 406 | | |
427 | 407 | | |
428 | 408 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | 409 | | |
440 | 410 | | |
441 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
418 | | - | |
419 | | - | |
| 417 | + | |
| 418 | + | |
420 | 419 | | |
421 | | - | |
422 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
423 | 424 | | |
424 | | - | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | 432 | | |
438 | 433 | | |
439 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
443 | 450 | | |
444 | 451 | | |
445 | 452 | | |
| |||
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 459 | + | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| |||
0 commit comments