From 27fed2b1ed7a1d028e6af937a1753c674346e866 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 5 Aug 2015 17:57:51 -0600 Subject: [PATCH] document `compiler/zo-struct` changes for new bytecode form --- pkgs/racket-doc/scribblings/raco/decompile.scrbl | 5 ++++- pkgs/racket-doc/scribblings/raco/zo-struct.scrbl | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/racket-doc/scribblings/raco/decompile.scrbl b/pkgs/racket-doc/scribblings/raco/decompile.scrbl index 2a680ba996..8cb9d9c4e1 100644 --- a/pkgs/racket-doc/scribblings/raco/decompile.scrbl +++ b/pkgs/racket-doc/scribblings/raco/decompile.scrbl @@ -104,7 +104,10 @@ Many forms in the decompiled code, such as @racket[module], @item{A form @racket[(#%apply-values _proc _expr)] is equivalent to @racket[(call-with-values (lambda () _expr) _proc)], but the run-time - system avoids allocating a closure for @racket[_expr].} + system avoids allocating a closure for @racket[_expr]. Similarly, + a @racket[#%call-with-immediate-continuation-mark] call is equivalent to + a @racket[call-with-immediate-continuation-mark] call, but avoiding + a closure allocation.} @item{A @racket[define-values] form may have @racket[(begin '%%inline-variant%% _expr1 _expr2)] for its expression, in which case diff --git a/pkgs/racket-doc/scribblings/raco/zo-struct.scrbl b/pkgs/racket-doc/scribblings/raco/zo-struct.scrbl index 371e067f15..c2be857a63 100644 --- a/pkgs/racket-doc/scribblings/raco/zo-struct.scrbl +++ b/pkgs/racket-doc/scribblings/raco/zo-struct.scrbl @@ -567,6 +567,22 @@ binding, constructor, etc.} which is handled specially by the run-time system.} +@defstruct+[(with-immed-mark expr) + ([key (or/c expr? seq? any/c)] + [val (or/c expr? seq? any/c)] + [body (or/c expr? seq? any/c)])]{ + + Represents a @racket[(call-with-immediate-continuation-mark key + (lambda (_arg) _body) val)] expression that is handled specially by + the run-time system to avoid a closure allocation. One initialized + slot is pushed onto the stack after @racket[expr] and @racket[val] + are evaluated and before @racket[body] is evaluated. + + After each of @racket[key] and @racket[val] is evaluated, the stack is + restored to its depth from before evaluating @racket[key] or + @racket[val].} + + @defstruct+[(primval expr) ([id exact-nonnegative-integer?])]{ Represents a direct reference to a variable imported from the run-time