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

Unified Diff: src/codegen.cc

Issue 113895: Simplify deferred code by removing some unneeded or redundant stuff. (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/codegen.h ('k') | src/codegen-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 2063)
+++ src/codegen.cc (working copy)
@@ -45,32 +45,24 @@
CodeGenerator* CodeGeneratorScope::top_ = NULL;
-DeferredCode::DeferredCode(CodeGenerator* generator)
- : generator_(generator),
- masm_(generator->masm()),
- exit_(JumpTarget::BIDIRECTIONAL),
- statement_position_(masm_->current_statement_position()),
- position_(masm_->current_position()) {
- generator->AddDeferred(this);
+DeferredCode::DeferredCode() : exit_(JumpTarget::BIDIRECTIONAL) {
+ MacroAssembler* masm = cgen()->masm();
+ statement_position_ = masm->current_statement_position();
+ position_ = masm->current_position();
ASSERT(statement_position_ != RelocInfo::kNoPosition);
ASSERT(position_ != RelocInfo::kNoPosition);
+
+ cgen()->AddDeferred(this);
#ifdef DEBUG
comment_ = "";
#endif
}
-void CodeGenerator::ClearDeferred() {
- for (int i = 0; i < deferred_.length(); i++) {
- deferred_[i]->Clear();
- }
-}
-
-
void CodeGenerator::ProcessDeferred() {
while (!deferred_.is_empty()) {
DeferredCode* code = deferred_.RemoveLast();
- MacroAssembler* masm = code->masm();
+ MacroAssembler* masm = code->cgen()->masm();
// Record position of deferred code stub.
masm->RecordStatementPosition(code->statement_position());
if (code->position() != RelocInfo::kNoPosition) {
@@ -80,7 +72,6 @@
Comment cmnt(masm, code->comment());
code->Generate();
ASSERT(code->enter()->is_bound());
- code->Clear();
}
}
« no previous file with comments | « src/codegen.h ('k') | src/codegen-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698