| Index: src/virtual-frame-ia32.h
|
| ===================================================================
|
| --- src/virtual-frame-ia32.h (revision 999)
|
| +++ src/virtual-frame-ia32.h (working copy)
|
| @@ -33,68 +33,6 @@
|
|
|
| namespace v8 { namespace internal {
|
|
|
| -
|
| -// The code generator's view of a frame element, when it wants to use it.
|
| -//
|
| -// A Result can be a register or a constant.
|
| -class Result BASE_EMBEDDED {
|
| - public:
|
| - // Construct a register Result.
|
| - Result(Register reg, CodeGenerator* cgen);
|
| -
|
| - // Construct a Result whose value is a compile-time constant.
|
| - Result(Handle<Object> value, CodeGenerator * cgen) :
|
| - type_(CONSTANT),
|
| - cgen_(cgen) {
|
| - data_.handle_ = value.location();
|
| - }
|
| -
|
| - ~Result() {
|
| - if (is_register()) {
|
| - Unuse();
|
| - }
|
| - }
|
| -
|
| - void Unuse();
|
| -
|
| - bool is_register() const { return type() == REGISTER; }
|
| - bool is_constant() const { return type() == CONSTANT; }
|
| - bool is_valid() const { return type() != INVALID; }
|
| -
|
| - Register reg() const {
|
| - ASSERT(type() == REGISTER);
|
| - return data_.reg_;
|
| - }
|
| -
|
| - Handle<Object> handle() const {
|
| - ASSERT(type() == CONSTANT);
|
| - return Handle<Object>(data_.handle_);
|
| - }
|
| -
|
| - // Change a result to a register result. If the result is not already
|
| - // in a register, allocate a register from the code generator, and emit
|
| - // code to move the value into that register.
|
| - void ToRegister();
|
| - private:
|
| - enum Type {
|
| - REGISTER,
|
| - CONSTANT,
|
| - INVALID
|
| - };
|
| -
|
| - Type type_;
|
| -
|
| - Type type() const { return type_; }
|
| -
|
| - union {
|
| - Register reg_;
|
| - Object** handle_;
|
| - } data_;
|
| -
|
| - CodeGenerator* cgen_;
|
| -};
|
| -
|
| -
|
| // -------------------------------------------------------------------------
|
| // Virtual frame elements
|
| //
|
| @@ -401,6 +339,10 @@
|
| void Push(Register reg);
|
| void Push(Handle<Object> value);
|
|
|
| + // Pushing a result invalidates it (its contents become owned by the
|
| + // frame).
|
| + void Push(Result* result);
|
| +
|
| #ifdef DEBUG
|
| bool IsSpilled();
|
| #endif
|
|
|