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

Unified Diff: src/deoptimizer.h

Issue 7282033: Change return type of FrameDescription::GetFrameSize to avoid unneeded type casts. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
===================================================================
--- src/deoptimizer.h (revision 8498)
+++ src/deoptimizer.h (working copy)
@@ -340,7 +340,10 @@
free(description);
}
- intptr_t GetFrameSize() const { return frame_size_; }
+ uint32_t GetFrameSize() const {
+ ASSERT(static_cast<uint32_t>(frame_size_) == frame_size_);
+ return static_cast<uint32_t>(frame_size_);
+ }
JSFunction* GetFunction() const { return function_; }
@@ -434,6 +437,9 @@
private:
static const uint32_t kZapUint32 = 0xbeeddead;
+ // Frame_size_ must hold a uint32_t value. It is only a uintptr_t to
+ // keep the variable-size array frame_content_ of type intptr_t at
+ // the end of the structure aligned.
uintptr_t frame_size_; // Number of bytes.
JSFunction* function_;
intptr_t registers_[Register::kNumRegisters];
« 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