Chromium Code Reviews| Index: src/ia32/virtual-frame-ia32.h |
| diff --git a/src/ia32/virtual-frame-ia32.h b/src/ia32/virtual-frame-ia32.h |
| index b69b800b04311a0ea6d7d0a6a3941d820ef8bfdf..b308c34755e39e77f80436ff115df98f5ff11bf9 100644 |
| --- a/src/ia32/virtual-frame-ia32.h |
| +++ b/src/ia32/virtual-frame-ia32.h |
| @@ -43,7 +43,7 @@ namespace internal { |
| // as random access to the expression stack elements, locals, and |
| // parameters. |
| -class VirtualFrame : public ZoneObject { |
| +class VirtualFrame: public ZoneObject { |
| public: |
| // A utility class to introduce a scope where the virtual frame is |
| // expected to remain spilled. The constructor spills the code |
| @@ -65,7 +65,7 @@ class VirtualFrame : public ZoneObject { |
| private: |
| bool previous_state_; |
| - CodeGenerator* cgen() { return CodeGeneratorScope::Current(); } |
| + CodeGenerator* cgen() {return CodeGeneratorScope::Current();} |
| }; |
| // An illegal index into the virtual frame. |
| @@ -77,14 +77,20 @@ class VirtualFrame : public ZoneObject { |
| // Construct a virtual frame as a clone of an existing one. |
| explicit VirtualFrame(VirtualFrame* original); |
| - CodeGenerator* cgen() { return CodeGeneratorScope::Current(); } |
| - MacroAssembler* masm() { return cgen()->masm(); } |
| + CodeGenerator* cgen() { |
| + return CodeGeneratorScope::Current(); |
| + } |
|
Erik Corry
2009/06/24 11:46:35
I'd prefer for these whitespace changes not to be
|
| + MacroAssembler* masm() { |
| + return cgen()->masm(); |
| + } |
| // Create a duplicate of an existing valid frame element. |
| FrameElement CopyElementAt(int index); |
| // The number of elements on the virtual frame. |
| - int element_count() { return elements_.length(); } |
| + int element_count() { |
| + return elements_.length(); |
| + } |
| // The height of the virtual expression stack. |
| int height() { |
| @@ -255,7 +261,9 @@ class VirtualFrame : public ZoneObject { |
| void PushReceiverSlotAddress(); |
| // Push the function on top of the frame. |
| - void PushFunction() { PushFrameSlotAt(function_index()); } |
| + void PushFunction() { |
| + PushFrameSlotAt(function_index()); |
| + } |
| // Save the value of the esi register to the context frame slot. |
| void SaveContextRegister(); |
| @@ -290,7 +298,9 @@ class VirtualFrame : public ZoneObject { |
| } |
| // The receiver frame slot. |
| - Operand Receiver() { return ParameterAt(-1); } |
| + Operand Receiver() { |
| + return ParameterAt(-1); |
| + } |
| // Push a try-catch or try-finally handler on top of the virtual frame. |
| void PushTryHandler(HandlerType type); |
| @@ -320,9 +330,7 @@ class VirtualFrame : public ZoneObject { |
| // Invoke builtin given the number of arguments it expects on (and |
| // removes from) the stack. |
| - Result InvokeBuiltin(Builtins::JavaScript id, |
| - InvokeFlag flag, |
| - int arg_count); |
| + Result InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag, int arg_count); |
| // Call load IC. Name and receiver are found on top of the frame. |
| // Receiver is not dropped. |
| @@ -357,10 +365,14 @@ class VirtualFrame : public ZoneObject { |
| void Drop(int count); |
| // Drop one element. |
| - void Drop() { Drop(1); } |
| + void Drop() { |
| + Drop(1); |
| + } |
| // Duplicate the top element of the frame. |
| - void Dup() { PushFrameSlotAt(element_count() - 1); } |
| + void Dup() { |
| + PushFrameSlotAt(element_count() - 1); |
| + } |
| // Pop an element from the top of the expression stack. Returns a |
| // Result, which may be a constant or a register. |
| @@ -378,15 +390,17 @@ class VirtualFrame : public ZoneObject { |
| void EmitPush(Immediate immediate); |
| // Push an element on the virtual frame. |
| - void Push(Register reg, StaticType static_type = StaticType()); |
| + void Push(Register reg); |
| void Push(Handle<Object> value); |
| - void Push(Smi* value) { Push(Handle<Object>(value)); } |
| + void Push(Smi* value) { |
| + Push(Handle<Object> (value)); |
| + } |
| // Pushing a result invalidates it (its contents become owned by the |
| // frame). |
| void Push(Result* result) { |
| if (result->is_register()) { |
| - Push(result->reg(), result->static_type()); |
| + Push(result->reg()); |
| } else { |
| ASSERT(result->is_constant()); |
| Push(result->handle()); |
| @@ -418,32 +432,48 @@ class VirtualFrame : public ZoneObject { |
| int register_locations_[RegisterAllocator::kNumRegisters]; |
| // The number of frame-allocated locals and parameters respectively. |
| - int parameter_count() { return cgen()->scope()->num_parameters(); } |
| - int local_count() { return cgen()->scope()->num_stack_slots(); } |
| + int parameter_count() { |
| + return cgen()->scope()->num_parameters(); |
| + } |
| + int local_count() { |
| + return cgen()->scope()->num_stack_slots(); |
| + } |
| // The index of the element that is at the processor's frame pointer |
| // (the ebp register). The parameters, receiver, and return address |
| // are below the frame pointer. |
| - int frame_pointer() { return parameter_count() + 2; } |
| + int frame_pointer() { |
| + return parameter_count() + 2; |
| + } |
| // The index of the first parameter. The receiver lies below the first |
| // parameter. |
| - int param0_index() { return 1; } |
| + int param0_index() { |
| + return 1; |
| + } |
| // The index of the context slot in the frame. It is immediately |
| // above the frame pointer. |
| - int context_index() { return frame_pointer() + 1; } |
| + int context_index() { |
| + return frame_pointer() + 1; |
| + } |
| // The index of the function slot in the frame. It is above the frame |
| // pointer and the context slot. |
| - int function_index() { return frame_pointer() + 2; } |
| + int function_index() { |
| + return frame_pointer() + 2; |
| + } |
| // The index of the first local. Between the frame pointer and the |
| // locals lie the context and the function. |
| - int local0_index() { return frame_pointer() + 3; } |
| + int local0_index() { |
| + return frame_pointer() + 3; |
| + } |
| // The index of the base of the expression stack. |
| - int expression_base_index() { return local0_index() + local_count(); } |
| + int expression_base_index() { |
| + return local0_index() + local_count(); |
| + } |
| // Convert a frame index into a frame pointer relative offset into the |
| // actual stack. |
| @@ -547,7 +577,6 @@ class VirtualFrame : public ZoneObject { |
| friend class JumpTarget; |
| }; |
| - |
| } } // namespace v8::internal |
| #endif // V8_IA32_VIRTUAL_FRAME_IA32_H_ |