HBasicBlock::CreateSimulate argument name clarity

* src/hydrogen.h:
* src/hydrogen.cc (HBasicBlock::CreateSimulate): Rename "id" arg to
  "ast_id".

BUG=
TEST=

Review URL: http://codereview.chromium.org/7234010
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ager@chromium.org 2011-06-23 06:26:50 +00:00
parent 0416b2edc4
commit 03fc1660b3
2 changed files with 11 additions and 11 deletions

View File

@ -131,7 +131,7 @@ HDeoptimize* HBasicBlock::CreateDeoptimize(
}
HSimulate* HBasicBlock::CreateSimulate(int id) {
HSimulate* HBasicBlock::CreateSimulate(int ast_id) {
ASSERT(HasEnvironment());
HEnvironment* environment = last_environment();
ASSERT(id == AstNode::kNoNumber ||
@ -140,7 +140,7 @@ HSimulate* HBasicBlock::CreateSimulate(int id) {
int push_count = environment->push_count();
int pop_count = environment->pop_count();
HSimulate* instr = new(zone()) HSimulate(id, pop_count);
HSimulate* instr = new(zone()) HSimulate(ast_id, pop_count);
for (int i = push_count - 1; i >= 0; --i) {
instr->AddPushedValue(environment->ExpressionStackAt(i));
}
@ -194,7 +194,7 @@ void HBasicBlock::SetInitialEnvironment(HEnvironment* env) {
}
void HBasicBlock::SetJoinId(int id) {
void HBasicBlock::SetJoinId(int ast_id) {
int length = predecessors_.length();
ASSERT(length > 0);
for (int i = 0; i < length; i++) {
@ -204,8 +204,8 @@ void HBasicBlock::SetJoinId(int id) {
// We only need to verify the ID once.
ASSERT(i != 0 ||
predecessor->last_environment()->closure()->shared()
->VerifyBailoutId(id));
simulate->set_ast_id(id);
->VerifyBailoutId(ast_id));
simulate->set_ast_id(ast_id);
}
}
@ -2328,9 +2328,9 @@ HInstruction* HGraphBuilder::AddInstruction(HInstruction* instr) {
}
void HGraphBuilder::AddSimulate(int id) {
void HGraphBuilder::AddSimulate(int ast_id) {
ASSERT(current_block() != NULL);
current_block()->AddSimulate(id);
current_block()->AddSimulate(ast_id);
}

View File

@ -116,14 +116,14 @@ class HBasicBlock: public ZoneObject {
bool HasParentLoopHeader() const { return parent_loop_header_ != NULL; }
void SetJoinId(int id);
void SetJoinId(int ast_id);
void Finish(HControlInstruction* last);
void FinishExit(HControlInstruction* instruction);
void Goto(HBasicBlock* block, bool include_stack_check = false);
int PredecessorIndexOf(HBasicBlock* predecessor) const;
void AddSimulate(int id) { AddInstruction(CreateSimulate(id)); }
void AddSimulate(int ast_id) { AddInstruction(CreateSimulate(ast_id)); }
void AssignCommonDominator(HBasicBlock* other);
void FinishExitWithDeoptimization(HDeoptimize::UseEnvironment has_uses) {
@ -156,7 +156,7 @@ class HBasicBlock: public ZoneObject {
void RegisterPredecessor(HBasicBlock* pred);
void AddDominatedBlock(HBasicBlock* block);
HSimulate* CreateSimulate(int id);
HSimulate* CreateSimulate(int ast_id);
HDeoptimize* CreateDeoptimize(HDeoptimize::UseEnvironment has_uses);
int block_id_;
@ -694,7 +694,7 @@ class HGraphBuilder: public AstVisitor {
// Adding instructions.
HInstruction* AddInstruction(HInstruction* instr);
void AddSimulate(int id);
void AddSimulate(int ast_id);
// Bailout environment manipulation.
void Push(HValue* value) { environment()->Push(value); }