Ticket #702 (closed todo: fixed)

Opened 6 years ago

Last modified 5 years ago

Remove stacks.c and stack-related ops

Reported by: whiteknight Owned by: whiteknight
Priority: normal Milestone: 1.5
Component: core Version: 1.2.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description (last modified by whiteknight) (diff)

We're deprecating stacks. Remove the file src/stacks.c and include/parrot/stacks.h. Also remove the opcodes that use these stacks: bsr, jsr and ret.

Attachments

bf-without-bsr-ret.patch Download (0.9 KB) - added by fperrad 5 years ago.
patch for language bf

Change History

  Changed 6 years ago by whiteknight

Added a deprecation notice for all these in r39144. I notice also that the opcodes pushmark, popmark, and pushaction all use the stacks system. These are not being deprecated, but will have to be reimplemented to use something besides stacks.c.

  Changed 6 years ago by whiteknight

  • description modified (diff)

  Changed 5 years ago by coke

bsr and ret are used by PGE/Hs.pir and PGE/Dumper.pir.

follow-ups: ↓ 5 ↓ 7   Changed 5 years ago by whiteknight

stack-related ops removed in r40268.

in reply to: ↑ 4   Changed 5 years ago by jkeenan

Replying to whiteknight:

stack-related ops removed in r40268.

I was running make fulltest at the moment the branch was merged into trunk. I observed these failures in that branch:

/usr/local/bin/perl t/harness t/benchmark/*.tt/benchmark/benchmarks....#   Failed test 'examples/benchmarks/stress.pasm'#   at t/benchmark/benchmarks.t line 214.# Exited with error code: 2# Received:# error:imcc:The opcode 'local_branch_ic_ic' (local_branch<2>) was not found. Check the type and number of the arguments
#   in file '/home/jimk/work/bsr_jsr_ret/t/benchmark/benchmarks_30.pasm' line 24
#
# Expected:
# (?x-ism:^A\stotal\sof\s\d+\sGC\sruns\s
#         were\smade\n$)
# Looks like you failed 1 test of 34.
 Dubious, test returned 1 (wstat 256, 0x100)
 Failed 1/34 subtests

Test Summary Report
-------------------
t/benchmark/benchmarks (Wstat: 256 Tests: 34 Failed: 1)
  Failed test:  30
  Non-zero exit status: 1
Files=1, Tests=34, 82 wallclock secs ( 0.01 usr  0.00 sys + 43.05 cusr  5.06 csys = 48.12 CPU)
Result: FAIL
make[1]: *** [benchmark_tests] Error 1
...
/usr/local/bin/perl t/harness t/examples/*.t
t/examples/catchall.....error:imcc:The opcode 'local_branch_ic_ic' (local_branch<2>) was not found. Check the type and number of the arguments    in file 'examples/benchmarks/stress.pasm' line 24

#   Failed test 'examples/benchmarks/stress.pasm'
#   at t/examples/catchall.t line 50.
#          got: '512'
#     expected: '0'
# Looks like you failed 1 test of 147.
 Dubious, test returned 1 (wstat 256, 0x100)
 Failed 1/147 subtests 
t/examples/subs.........open 'examples/subs/jsr_ret.pasm': No such file or directory at lib/Parrot/BuildUtil.pm line 88.
# Looks like your test died before it could output anything.
 Dubious, test returned 255 (wstat 65280, 0xff00)
 Failed 7/7 subtests 
t/examples/tutorial.....ok

Test Summary Report
------------------- 
/examples/catchall (Wstat: 256 Tests: 147 Failed: 1)
  Failed test:  33
  Non-zero exit status: 1
t/examples/subs     (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 7 tests but ran 0.
Files=12, Tests=865, 87 wallclock secs ( 0.10 usr  0.00 sys + 25.48 cusr  3.52 csys = 29.10 CPU)
Result: FAIL
make[1]: *** [examples_tests] Error 1

The failures were then observed in trunk by mikehh and by me (r40271).

kid51

  Changed 5 years ago by whiteknight

Thanks for the catch. Fixed in r40279.

in reply to: ↑ 4   Changed 5 years ago by fperrad

Replying to whiteknight:

stack-related ops removed in r40268.

since this commit, the target 'pirc' is broken :

$ make pirc
...
src\pircompunit.c:2479: error: `PARROT_OP_ret' undeclared (first use in this function)

  Changed 5 years ago by whiteknight

thanks for the report, I think this issue is fixed as of r40278.

  Changed 5 years ago by fperrad

The language bf is broken, bfco.pir uses the opcode 'bsr' & 'ret'.

Could you review my patch ?

Changed 5 years ago by fperrad

patch for language bf

  Changed 5 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.