Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: src/virtual-frame-ia32.h

Issue 20257: Experimental: when doing memory-to-memory moves as part of a frame... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Handle<Object> handle() const { 117 Handle<Object> handle() const {
118 ASSERT(is_constant()); 118 ASSERT(is_constant());
119 return Handle<Object>(data_.handle_); 119 return Handle<Object>(data_.handle_);
120 } 120 }
121 121
122 int index() const { 122 int index() const {
123 ASSERT(is_copy()); 123 ASSERT(is_copy());
124 return data_.index_; 124 return data_.index_;
125 } 125 }
126 126
127 #ifdef DEBUG
128 bool Equals(FrameElement other);
129 #endif
130
127 private: 131 private:
128 enum Type { 132 enum Type {
129 INVALID, 133 INVALID,
130 MEMORY, 134 MEMORY,
131 REGISTER, 135 REGISTER,
132 CONSTANT, 136 CONSTANT,
133 COPY 137 COPY
134 }; 138 };
135 139
136 // BitField is <type, shift, size>. 140 // BitField is <type, shift, size>.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 310
307 // The function frame slot. 311 // The function frame slot.
308 Operand Function() const { return Operand(ebp, kFunctionOffset); } 312 Operand Function() const { return Operand(ebp, kFunctionOffset); }
309 313
310 // Push the address of the receiver slot on the frame. 314 // Push the address of the receiver slot on the frame.
311 void PushReceiverSlotAddress(); 315 void PushReceiverSlotAddress();
312 316
313 // Push the function on top of the frame. 317 // Push the function on top of the frame.
314 void PushFunction() { LoadFrameSlotAt(function_index()); } 318 void PushFunction() { LoadFrameSlotAt(function_index()); }
315 319
316 // Lazily save the value of the esi register to the context frame slot. 320 // Save the value of the esi register to the context frame slot.
317 void SaveContextRegister(); 321 void SaveContextRegister();
318 322
319 // Eagerly restore the esi register from the value of the frame context 323 // Restore the esi register from the value of the context frame
320 // slot. 324 // slot.
321 void RestoreContextRegister(); 325 void RestoreContextRegister();
322 326
323 // A parameter as an assembly operand. 327 // A parameter as an assembly operand.
324 Operand ParameterAt(int index) const { 328 Operand ParameterAt(int index) const {
325 ASSERT(-1 <= index); // -1 is the receiver. 329 ASSERT(-1 <= index); // -1 is the receiver.
326 ASSERT(index < parameter_count_); 330 ASSERT(index < parameter_count_);
327 return Operand(ebp, (1 + parameter_count_ - index) * kPointerSize); 331 return Operand(ebp, (1 + parameter_count_ - index) * kPointerSize);
328 } 332 }
329 333
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 426
423 // Pushing a result invalidates it (its contents become owned by the 427 // Pushing a result invalidates it (its contents become owned by the
424 // frame). 428 // frame).
425 void Push(Result* result); 429 void Push(Result* result);
426 430
427 // Nip removes zero or more elements from immediately below the top 431 // Nip removes zero or more elements from immediately below the top
428 // of the frame, leaving the previous top-of-frame value on top of 432 // of the frame, leaving the previous top-of-frame value on top of
429 // the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x). 433 // the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x).
430 void Nip(int num_dropped); 434 void Nip(int num_dropped);
431 435
432 #ifdef DEBUG
433 bool IsSpilled();
434 #endif
435
436 private: 436 private:
437 // An illegal index into the virtual frame. 437 // An illegal index into the virtual frame.
438 static const int kIllegalIndex = -1; 438 static const int kIllegalIndex = -1;
439 439
440 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset; 440 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset;
441 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset; 441 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset;
442 static const int kContextOffset = StandardFrameConstants::kContextOffset; 442 static const int kContextOffset = StandardFrameConstants::kContextOffset;
443 443
444 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize; 444 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize;
445 445
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // copies. 569 // copies.
570 FrameElement AdjustCopies(int index); 570 FrameElement AdjustCopies(int index);
571 571
572 // Call a code stub that has already been prepared for calling (via 572 // Call a code stub that has already been prepared for calling (via
573 // PrepareForCall). 573 // PrepareForCall).
574 Result RawCallStub(CodeStub* stub, int frame_arg_count); 574 Result RawCallStub(CodeStub* stub, int frame_arg_count);
575 575
576 // Calls a code object which has already been prepared for calling 576 // Calls a code object which has already been prepared for calling
577 // (via PrepareForCall). 577 // (via PrepareForCall).
578 Result RawCallCodeObject(Handle<Code> code, RelocInfo::Mode rmode); 578 Result RawCallCodeObject(Handle<Code> code, RelocInfo::Mode rmode);
579
580 #ifdef DEBUG
581 bool Equals(VirtualFrame* other);
582 #endif
579 }; 583 };
580 584
581 } } // namespace v8::internal 585 } } // namespace v8::internal
582 586
583 #endif // V8_VIRTUAL_FRAME_IA32_H_ 587 #endif // V8_VIRTUAL_FRAME_IA32_H_
OLDNEW
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | src/virtual-frame-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698