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

Unified Diff: src/jump-target.cc

Issue 115345: - Make VirtualFrame and JumpTarget zone allocated.... (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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jump-target.cc
===================================================================
--- src/jump-target.cc (revision 1946)
+++ src/jump-target.cc (working copy)
@@ -41,11 +41,11 @@
JumpTarget::JumpTarget(CodeGenerator* cgen, Directionality direction)
: cgen_(cgen),
direction_(direction),
+ is_bound_(false),
+ is_linked_(false),
reaching_frames_(0),
merge_labels_(0),
- entry_frame_(NULL),
- is_bound_(false),
- is_linked_(false) {
+ entry_frame_(NULL) {
ASSERT(cgen != NULL);
masm_ = cgen->masm();
}
@@ -55,11 +55,11 @@
: cgen_(NULL),
masm_(NULL),
direction_(FORWARD_ONLY),
+ is_bound_(false),
+ is_linked_(false),
reaching_frames_(0),
merge_labels_(0),
- entry_frame_(NULL),
- is_bound_(false),
- is_linked_(false) {
+ entry_frame_(NULL) {
}
@@ -73,19 +73,6 @@
void JumpTarget::Unuse() {
- // We should not deallocate jump targets that have unresolved jumps
- // to them. In the event of a compile-time stack overflow or an
- // uninitialized jump target, we don't care.
- ASSERT(!is_linked() || cgen_ == NULL || cgen_->HasStackOverflow());
- for (int i = 0; i < reaching_frames_.length(); i++) {
- delete reaching_frames_[i];
- }
- delete entry_frame_;
- Reset();
-}
-
-
-void JumpTarget::Reset() {
reaching_frames_.Clear();
merge_labels_.Clear();
entry_frame_ = NULL;
@@ -662,10 +649,8 @@
// While shadowing this shadow target saves the state of the original.
shadowed->CopyTo(this);
- // The original's state is reset. We do not Unuse it because that
- // would delete the expected frame and assert that the target is not
- // linked.
- shadowed->Reset();
+ // The original's state is reset.
+ shadowed->Unuse();
ASSERT(cgen_ != NULL);
ASSERT(cgen_->has_valid_frame());
shadowed->set_expected_height(cgen_->frame()->height());
@@ -691,7 +676,7 @@
other_target_->CopyTo(&temp);
CopyTo(other_target_);
temp.CopyTo(this);
- temp.Reset(); // So the destructor does not deallocate virtual frames.
+ temp.Unuse();
#ifdef DEBUG
is_shadowing_ = false;
« no previous file with comments | « src/jump-target.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698