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

Unified Diff: src/virtual-frame.cc

Issue 115564: Size reduction of VirtualFrame objects. Remove the code generator and... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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/jump-target.cc ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame.cc
===================================================================
--- src/virtual-frame.cc (revision 2006)
+++ src/virtual-frame.cc (working copy)
@@ -37,13 +37,8 @@
// When cloned, a frame is a deep copy of the original.
VirtualFrame::VirtualFrame(VirtualFrame* original)
- : cgen_(original->cgen_),
- masm_(original->masm_),
- elements_(original->elements_),
- parameter_count_(original->parameter_count_),
- local_count_(original->local_count_),
- stack_pointer_(original->stack_pointer_),
- frame_pointer_(original->frame_pointer_) {
+ : elements_(original->elements_),
+ stack_pointer_(original->stack_pointer_) {
// Copy register locations from original.
memcpy(&register_locations_,
original->register_locations_,
@@ -118,7 +113,7 @@
// A hack to properly count register references for the code
// generator's current frame and also for other frames. The
// same code appears in PrepareMergeTo.
- if (cgen_->frame() == this) {
+ if (cgen()->frame() == this) {
Unuse(last.reg());
} else {
register_locations_[last.reg().code()] = kIllegalIndex;
@@ -133,10 +128,10 @@
// Find the leftmost (ordered by register code) register whose only
// reference is in the frame.
for (int i = 0; i < kNumRegisters; i++) {
- if (is_used(i) && cgen_->allocator()->count(i) == 1) {
+ if (is_used(i) && cgen()->allocator()->count(i) == 1) {
Register result = { i };
Spill(result);
- ASSERT(!cgen_->allocator()->is_used(result));
+ ASSERT(!cgen()->allocator()->is_used(result));
return result;
}
}
@@ -200,7 +195,7 @@
// If the frame is the code generator's current frame, we have
// to decrement both the frame-internal and global register
// counts.
- if (cgen_->frame() == this) {
+ if (cgen()->frame() == this) {
Unuse(source.reg());
} else {
register_locations_[source.reg().code()] = kIllegalIndex;
@@ -369,14 +364,6 @@
bool VirtualFrame::Equals(VirtualFrame* other) {
#ifdef DEBUG
- // These are sanity checks in debug builds, but we do not need to
- // use them to distinguish frames at merge points.
- if (cgen_ != other->cgen_) return false;
- if (masm_ != other->masm_) return false;
- if (parameter_count_ != other->parameter_count_) return false;
- if (local_count_ != other->local_count_) return false;
- if (frame_pointer_ != other->frame_pointer_) return false;
-
for (int i = 0; i < kNumRegisters; i++) {
if (register_locations_[i] != other->register_locations_[i]) {
return false;
« no previous file with comments | « src/jump-target.cc ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698