OLD | NEW |
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // The index of the base of the expression stack. | 370 // The index of the base of the expression stack. |
371 int expression_base_index() const { return local0_index() + local_count_; } | 371 int expression_base_index() const { return local0_index() + local_count_; } |
372 | 372 |
373 // Convert a frame index into a frame pointer relative offset into the | 373 // Convert a frame index into a frame pointer relative offset into the |
374 // actual stack. | 374 // actual stack. |
375 int fp_relative(int index) const { | 375 int fp_relative(int index) const { |
376 return (frame_pointer_ - index) * kPointerSize; | 376 return (frame_pointer_ - index) * kPointerSize; |
377 } | 377 } |
378 | 378 |
379 // Record an occurrence of a register in the virtual frame. This has the | 379 // Record an occurrence of a register in the virtual frame. This has the |
380 // effect of incrementing both the register's frame-internal reference | 380 // effect of incrementing the register's external reference count and |
381 // count and its external reference count. | 381 // of updating the index of the register's location in the frame. |
382 void Use(Register reg); | 382 void Use(Register reg, int index); |
383 | 383 |
384 // Record that a register reference has been dropped from the frame. This | 384 // Record that a register reference has been dropped from the frame. This |
385 // decrements both the register's internal and external reference counts. | 385 // decrements the register's external reference count and invalidates the |
| 386 // index of the register's location in the frame. |
386 void Unuse(Register reg); | 387 void Unuse(Register reg); |
387 | 388 |
388 // Spill the element at a particular index---write it to memory if | 389 // Spill the element at a particular index---write it to memory if |
389 // necessary, free any associated register, and forget its value if | 390 // necessary, free any associated register, and forget its value if |
390 // constant. | 391 // constant. |
391 void SpillElementAt(int index); | 392 void SpillElementAt(int index); |
392 | 393 |
393 // Sync the element at a particular index. If it is a register or | 394 // Sync the element at a particular index. If it is a register or |
394 // constant that disagrees with the value on the stack, write it to memory. | 395 // constant that disagrees with the value on the stack, write it to memory. |
395 // Keep the element type as register or constant, and clear the dirty bit. | 396 // Keep the element type as register or constant, and clear the dirty bit. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 458 |
458 bool Equals(VirtualFrame* other); | 459 bool Equals(VirtualFrame* other); |
459 | 460 |
460 friend class JumpTarget; | 461 friend class JumpTarget; |
461 }; | 462 }; |
462 | 463 |
463 | 464 |
464 } } // namespace v8::internal | 465 } } // namespace v8::internal |
465 | 466 |
466 #endif // V8_VIRTUAL_FRAME_ARM_H_ | 467 #endif // V8_VIRTUAL_FRAME_ARM_H_ |
OLD | NEW |