Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add debugging/profiling to quote_EXPR.
  • Loading branch information
pmichaud committed Aug 18, 2010
1 parent f49a206 commit aa0e12b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/cheats/hll-grammar.pir
Expand Up @@ -286,6 +286,16 @@ position C<pos>.
.sub 'quote_EXPR' :method
.param pmc args :slurpy

.local pmc cur, debug
.local string target
.local int pos

(cur, pos, target) = self.'!cursor_start'()
debug = getattribute cur, '$!debug'
if null debug goto debug_1
cur.'!cursor_debug'('START', 'quote_EXPR')
debug_1:

.local pmc quotemod, true
.lex '%*QUOTEMOD', quotemod
quotemod = new ['Hash']
Expand Down Expand Up @@ -314,11 +324,6 @@ position C<pos>.
goto args_loop
args_done:

.local pmc cur
.local string target
.local int pos

(cur, pos, target) = self.'!cursor_start'()

.local pmc start, stop
(start, stop) = self.'peek_delimiters'(target, pos)
Expand All @@ -332,7 +337,13 @@ position C<pos>.
$P10.'!cursor_names'('quote_delimited')
pos = $P10.'pos'()
cur.'!cursor_pass'(pos, 'quote_EXPR')
if null debug goto done
cur.'!cursor_debug'('PASS', 'quote_EXPR')
goto done
fail:
if null debug goto done
cur.'!cursor_debug'('FAIL', 'quote_EXPR')
done:
.return (cur)
.end

Expand Down

0 comments on commit aa0e12b

Please sign in to comment.