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

Unified Diff: src/hydrogen.cc

Issue 5699002: RFC: Switch to ast ids (instead of positions) for type feedback. (Closed)
Patch Set: Cleanup Created 10 years 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ad327c450eb81556a7ecda1c0321247012760cd7..095f04725c371b1fd2aa9703d44e15d527a7604b 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -121,10 +121,10 @@ HInstruction* HBasicBlock::GetLastInstruction() {
}
-HSimulate* HBasicBlock::CreateSimulate(int id) {
+HSimulate* HBasicBlock::CreateSimulate(AstId id) {
ASSERT(HasEnvironment());
HEnvironment* environment = last_environment();
- ASSERT(id == AstNode::kNoNumber ||
+ ASSERT(id == kNoAstId ||
environment->closure()->shared()->VerifyBailoutId(id));
int push_count = environment->push_count();
@@ -158,7 +158,7 @@ void HBasicBlock::Finish(HControlInstruction* end) {
void HBasicBlock::Goto(HBasicBlock* block, bool include_stack_check) {
- AddSimulate(AstNode::kNoNumber);
+ AddSimulate(kNoAstId);
HGoto* instr = new HGoto(block);
instr->set_include_stack_check(include_stack_check);
Finish(instr);
@@ -434,7 +434,7 @@ void HGraph::Verify() const {
// Check that all join blocks have predecessors that end with an
// unconditional goto and agree on their environment node id.
if (block->predecessors()->length() >= 2) {
- int id = block->predecessors()->first()->last_environment()->ast_id();
+ AstId id = block->predecessors()->first()->last_environment()->ast_id();
for (int k = 0; k < block->predecessors()->length(); k++) {
HBasicBlock* predecessor = block->predecessors()->at(k);
ASSERT(predecessor->end()->IsGoto());
@@ -3953,7 +3953,7 @@ bool HGraphBuilder::TryInline(Call* expr) {
call_context_ = ast_context();
TypeFeedbackOracle new_oracle(Handle<Code>(shared->code()));
oracle_ = &new_oracle;
- graph()->info()->SetOsrAstId(AstNode::kNoNumber);
+ graph()->info()->SetOsrAstId(kNoAstId);
HSubgraph* body = CreateInlinedSubgraph(env, target, function);
body->exit_block()->AddInstruction(new HEnterInlined(target, function));
@@ -4457,7 +4457,7 @@ HInstruction* HGraphBuilder::BuildIncrement(HValue* value, bool increment) {
? graph_->GetConstant1()
: graph_->GetConstantMinus1();
HInstruction* instr = new HAdd(value, delta);
- AssumeRepresentation(instr, Representation::Integer32());
+ AssumeRepresentation(instr, Representation::Integer32());
return instr;
}
@@ -5131,7 +5131,7 @@ HEnvironment::HEnvironment(HEnvironment* outer,
outer_(outer),
pop_count_(0),
push_count_(0),
- ast_id_(AstNode::kNoNumber) {
+ ast_id_(kNoAstId) {
Initialize(scope->num_parameters() + 1, scope->num_stack_slots(), 0);
}

Powered by Google App Engine
This is Rietveld 408576698