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

Side by Side Diff: src/deoptimizer.h

Issue 19748003: Introduce kRegisterSize, kPCOnStackSize and kFPOnStackSize constants (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 friend class FrameDescription; 466 friend class FrameDescription;
467 friend class DeoptimizingCodeListNode; 467 friend class DeoptimizingCodeListNode;
468 friend class DeoptimizedFrameInfo; 468 friend class DeoptimizedFrameInfo;
469 }; 469 };
470 470
471 471
472 class FrameDescription { 472 class FrameDescription {
473 public: 473 public:
474 FrameDescription(uint32_t frame_size, 474 FrameDescription(uint32_t frame_size,
475 JSFunction* function); 475 JSFunction* function);
476 virtual ~FrameDescription() { }
476 477
477 void* operator new(size_t size, uint32_t frame_size) { 478 void* operator new(size_t size, uint32_t frame_size) {
478 // Subtracts kPointerSize, as the member frame_content_ already supplies 479 // Subtracts kPointerSize, as the member frame_content_ already supplies
479 // the first element of the area to store the frame. 480 // the first element of the area to store the frame.
480 return malloc(size + frame_size - kPointerSize); 481 return malloc(size + frame_size - kPointerSize);
481 } 482 }
482 483
483 void operator delete(void* pointer, uint32_t frame_size) { 484 void operator delete(void* pointer, uint32_t frame_size) {
484 free(pointer); 485 free(pointer);
485 } 486 }
(...skipping 17 matching lines...) Expand all
503 504
504 double GetDoubleFrameSlot(unsigned offset) { 505 double GetDoubleFrameSlot(unsigned offset) {
505 intptr_t* ptr = GetFrameSlotPointer(offset); 506 intptr_t* ptr = GetFrameSlotPointer(offset);
506 return read_double_value(reinterpret_cast<Address>(ptr)); 507 return read_double_value(reinterpret_cast<Address>(ptr));
507 } 508 }
508 509
509 void SetFrameSlot(unsigned offset, intptr_t value) { 510 void SetFrameSlot(unsigned offset, intptr_t value) {
510 *GetFrameSlotPointer(offset) = value; 511 *GetFrameSlotPointer(offset) = value;
511 } 512 }
512 513
514 virtual void SetCallerPc(unsigned offset, intptr_t value);
515
516 virtual void SetCallerFp(unsigned offset, intptr_t value);
517
513 intptr_t GetRegister(unsigned n) const { 518 intptr_t GetRegister(unsigned n) const {
514 ASSERT(n < ARRAY_SIZE(registers_)); 519 ASSERT(n < ARRAY_SIZE(registers_));
515 return registers_[n]; 520 return registers_[n];
516 } 521 }
517 522
518 double GetDoubleRegister(unsigned n) const { 523 double GetDoubleRegister(unsigned n) const {
519 ASSERT(n < ARRAY_SIZE(double_registers_)); 524 ASSERT(n < ARRAY_SIZE(double_registers_));
520 return double_registers_[n]; 525 return double_registers_[n];
521 } 526 }
522 527
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 Object** expression_stack_; 951 Object** expression_stack_;
947 int source_position_; 952 int source_position_;
948 953
949 friend class Deoptimizer; 954 friend class Deoptimizer;
950 }; 955 };
951 #endif 956 #endif
952 957
953 } } // namespace v8::internal 958 } } // namespace v8::internal
954 959
955 #endif // V8_DEOPTIMIZER_H_ 960 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698