From: edwin Date: Mon, 6 Feb 2006 06:16:34 +0000 (+0000) Subject: * doc/inlining_stacktrace.txt: Clarified, added entry after the inlined body X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=commitdiff_plain;h=04b1ebb443ba2e1d7a766e532ae3c8d43f55eb52 * doc/inlining_stacktrace.txt: Clarified, added entry after the inlined body for the rest of the line after the call. --- diff --git a/doc/inlining_stacktrace.txt b/doc/inlining_stacktrace.txt index 7b3de7a45..335b3d538 100644 --- a/doc/inlining_stacktrace.txt +++ b/doc/inlining_stacktrace.txt @@ -8,17 +8,18 @@ Changes: - The layout of the line number table looks like this: +----------+----------------------+ - | ln 1 | start PC of line 1 | + | ln 1 | first PC of line 1 | +----------+----------------------+ - | ln 2 | start PC of line 2 | + | ln 2 | first PC of line 2 | +----------+----------------------+ ... +----------+----------------------+ - | ln N | start PC of line N | + | ln N | first PC of line N | +----------+----------------------+ Note: "ln 1" means the line number of the first line of the method body, - and so on. + and so on. The PC is always the start of the first instruction + belonging to the given line. For inlined methods special entries are inserted into the table. The special @@ -26,37 +27,47 @@ entries have negative line numbers. If there is an inlined method call at line X, the table looks like this: +----------+----------------------+ - | ln 1 | start PC of line 1 | + | ln 1 | first PC of line 1 | +----------+----------------------+ - | ln 2 | start PC of line 2 | + | ln 2 | first PC of line 2 | +----------+----------------------+ ... +----------+----------------------+ - | -2 | start PC of line X | <-- "-2" marks start of inlined method + | -2 | first PC of line X | <-- "-2" marks start of inlined method +----------+----------------------+ - | ln 1' | start PC of line 1' | \ + | ln 1' | first PC of line 1' | \ +----------+----------------------+ | - | ln 2' | start PC of line 2' | | + | ln 2' | first PC of line 2' | | +----------+----------------------+ |--- these refer to lines within the body of ... | the inlined callee +----------+----------------------+ | - | ln N' | start PC of line N' | / + | ln N' | first PC of line N' | / +----------+----------------------+ | -3-ln X | methodinfo* to callee| <-- methodinfo* instead of PC, -3 minus line number +----------+----------------------+ - | -1 | start PC of line X | <-- NOTE THE PC! + | -1 | first PC of inlined | <-- NOTE THE PC! It's the first, not the last PC. + | | method body | +----------+----------------------+ - | ln X+1 | start PC of line X+1 | + | ln X | first PC of line X | for the rest of line X, after the inlined call + | | after the call | + +----------+----------------------+ + | ln X+1 | first PC of line X+1 | +----------+----------------------+ ... +----------+----------------------+ - | ln N | start PC of line N | + | ln N | first PC of line N | +----------+----------------------+ CAUTION: line numbers are stored as unsigned ptrint! You need to cast them (to s4) in order to test <0, etc. (The ptrint values are created by casting a s4 to ptrint.) +Nesting +------- + +For nested inline bodies, the entries of the inner inline body are inserted +between the entries of the outer inline body just the same as at the top level. + # vim: et sw=4 sts=4 ts=4