| Index: src/jump-target.h
|
| ===================================================================
|
| --- src/jump-target.h (revision 3310)
|
| +++ src/jump-target.h (working copy)
|
| @@ -184,7 +184,15 @@
|
| // and will drop state from nested statements as part of merging.
|
| //
|
| // Break targets are used for return, break, and continue targets.
|
| +//
|
| +// The fast compiler needs a similar object, containing a Label and
|
| +// the stack height. Since the parser already creates break targets
|
| +// at all the appropriate sites, and creates the necessary links from
|
| +// the AST to the break targets, we add an interface to break targets that
|
| +// simply exposes the stack height and their underlying label, for use
|
| +// in the fast compiler.
|
|
|
| +
|
| class BreakTarget : public JumpTarget {
|
| public:
|
| // Construct a break target.
|
| @@ -222,6 +230,9 @@
|
| // Setter for expected height.
|
| void set_expected_height(int expected) { expected_height_ = expected; }
|
|
|
| + // Added interface for the fast compiler:
|
| + int expected_height() { return expected_height_; }
|
| + // Label* entry_label() is already declared public in JumpTarget.
|
| private:
|
| // The expected height of the expression stack where the target will
|
| // be bound, statically known at initialization time.
|
|
|