WeSearch

Cheney on the MTA (1994)

·11 min read · 0 reactions · 0 comments · 11 views
#programming#compilation#garbage-collection
⚡ TL;DR · AI summary

The article discusses a proposed method for implementing tail recursion in Scheme when compiling to C. It suggests using continuation-passing style to avoid stack overflow issues associated with traditional methods. The approach aims to simplify function calls and memory management by treating the C stack as a heap for dynamic allocation.

Key facts
Original article
Plover
Read full at Plover →
Opening excerpt (first ~120 words) tap to expand

CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A.[1] DRAFT for comp.lang.scheme.c Feb. 4, 1994 ACM Sigplan Notices 30, 9 (Sept. 1995), 17-20. Henry G. Baker Nimble Computer Corporation, 16231 Meadow Ridge Way, Encino, CA 91436 (818) 501-4956 (818) 986-1360 (FAX) Copyright (c) 1994 by Nimble Computer Corporation. All rights reserved. Abstract Previous Schemes for implementing full tail-recursion when compiling into C have required some form of "trampoline" to pop the stack. We propose solving the tail-recursion problem in the same manner as Standard ML of New Jersey, by allocating all frames in the (garbage-collected) heap. The Scheme program is translated into continuation-passing style, so the target C functions never return.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Plover.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Plover