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

Unified Diff: src/deoptimizer.h

Issue 6744004: Done rely on C++ object padding across platforms (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
===================================================================
--- src/deoptimizer.h (revision 7362)
+++ src/deoptimizer.h (working copy)
@@ -326,7 +326,9 @@
JSFunction* function);
void* operator new(size_t size, uint32_t frame_size) {
- return malloc(size + frame_size);
+ // Subtracts kPointerSize, as the member frame_content_ already supplies
+ // the first element of the area to store the frame.
+ return malloc(size + frame_size - kPointerSize);
}
void operator delete(void* description) {
@@ -410,7 +412,7 @@
}
static int frame_content_offset() {
- return sizeof(FrameDescription);
+ return OFFSET_OF(FrameDescription, frame_content_);
}
private:
@@ -429,6 +431,10 @@
// deoptimizing.
intptr_t continuation_;
+ // This must be at the end of the object as the object is allocated larger
+ // than it's definition indicate to extend this array.
+ intptr_t frame_content_[1];
+
intptr_t* GetFrameSlotPointer(unsigned offset) {
ASSERT(offset < frame_size_);
return reinterpret_cast<intptr_t*>(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698