| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 void* operator new(size_t size, uint32_t frame_size) { | 333 void* operator new(size_t size, uint32_t frame_size) { |
| 334 // Subtracts kPointerSize, as the member frame_content_ already supplies | 334 // Subtracts kPointerSize, as the member frame_content_ already supplies |
| 335 // the first element of the area to store the frame. | 335 // the first element of the area to store the frame. |
| 336 return malloc(size + frame_size - kPointerSize); | 336 return malloc(size + frame_size - kPointerSize); |
| 337 } | 337 } |
| 338 | 338 |
| 339 void operator delete(void* description) { | 339 void operator delete(void* description) { |
| 340 free(description); | 340 free(description); |
| 341 } | 341 } |
| 342 | 342 |
| 343 intptr_t GetFrameSize() const { return frame_size_; } | 343 uint32_t GetFrameSize() const { |
| 344 ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_); |
| 345 return static_cast<uint32_t>(frame_size_); |
| 346 } |
| 344 | 347 |
| 345 JSFunction* GetFunction() const { return function_; } | 348 JSFunction* GetFunction() const { return function_; } |
| 346 | 349 |
| 347 unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index); | 350 unsigned GetOffsetFromSlotIndex(Deoptimizer* deoptimizer, int slot_index); |
| 348 | 351 |
| 349 intptr_t GetFrameSlot(unsigned offset) { | 352 intptr_t GetFrameSlot(unsigned offset) { |
| 350 return *GetFrameSlotPointer(offset); | 353 return *GetFrameSlotPointer(offset); |
| 351 } | 354 } |
| 352 | 355 |
| 353 double GetDoubleFrameSlot(unsigned offset) { | 356 double GetDoubleFrameSlot(unsigned offset) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 return OFFSET_OF(FrameDescription, continuation_); | 430 return OFFSET_OF(FrameDescription, continuation_); |
| 428 } | 431 } |
| 429 | 432 |
| 430 static int frame_content_offset() { | 433 static int frame_content_offset() { |
| 431 return OFFSET_OF(FrameDescription, frame_content_); | 434 return OFFSET_OF(FrameDescription, frame_content_); |
| 432 } | 435 } |
| 433 | 436 |
| 434 private: | 437 private: |
| 435 static const uint32_t kZapUint32 = 0xbeeddead; | 438 static const uint32_t kZapUint32 = 0xbeeddead; |
| 436 | 439 |
| 440 // Frame_size_ must hold a uint32_t value. It is only a uintptr_t to |
| 441 // keep the variable-size array frame_content_ of type intptr_t at |
| 442 // the end of the structure aligned. |
| 437 uintptr_t frame_size_; // Number of bytes. | 443 uintptr_t frame_size_; // Number of bytes. |
| 438 JSFunction* function_; | 444 JSFunction* function_; |
| 439 intptr_t registers_[Register::kNumRegisters]; | 445 intptr_t registers_[Register::kNumRegisters]; |
| 440 double double_registers_[DoubleRegister::kNumAllocatableRegisters]; | 446 double double_registers_[DoubleRegister::kNumAllocatableRegisters]; |
| 441 intptr_t top_; | 447 intptr_t top_; |
| 442 intptr_t pc_; | 448 intptr_t pc_; |
| 443 intptr_t fp_; | 449 intptr_t fp_; |
| 444 Smi* state_; | 450 Smi* state_; |
| 445 #ifdef DEBUG | 451 #ifdef DEBUG |
| 446 Code::Kind kind_; | 452 Code::Kind kind_; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 int expression_count_; | 681 int expression_count_; |
| 676 Object** expression_stack_; | 682 Object** expression_stack_; |
| 677 | 683 |
| 678 friend class Deoptimizer; | 684 friend class Deoptimizer; |
| 679 }; | 685 }; |
| 680 #endif | 686 #endif |
| 681 | 687 |
| 682 } } // namespace v8::internal | 688 } } // namespace v8::internal |
| 683 | 689 |
| 684 #endif // V8_DEOPTIMIZER_H_ | 690 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |