}
-class HOptimizedGraphBuilderWithPotisions: public HOptimizedGraphBuilder {
+class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
public:
- explicit HOptimizedGraphBuilderWithPotisions(CompilationInfo* info)
+ explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
: HOptimizedGraphBuilder(info) {
}
AstTyper::Run(info());
graph_builder_ = FLAG_emit_opt_code_positions
- ? new(info()->zone()) HOptimizedGraphBuilderWithPotisions(info())
+ ? new(info()->zone()) HOptimizedGraphBuilderWithPositions(info())
: new(info()->zone()) HOptimizedGraphBuilder(info());
Timer t(this, &time_taken_to_create_graph_);
ASSERT(graph_ != NULL);
BailoutReason bailout_reason = kNoReason;
if (!graph_->Optimize(&bailout_reason)) {
- if (bailout_reason == kNoReason) graph_builder_->Bailout(bailout_reason);
+ if (bailout_reason != kNoReason) graph_builder_->Bailout(bailout_reason);
return SetLastStatus(BAILED_OUT);
} else {
chunk_ = LChunk::NewChunk(graph_);
HBasicBlock* block = graph()->blocks()->at(block_id);
UpdateLivenessAtBlockEnd(block, &live);
- for (HInstruction* instr = block->last(); instr != NULL;
+ for (HInstruction* instr = block->end(); instr != NULL;
instr = instr->previous()) {
UpdateLivenessAtInstruction(instr, &live);
}
class HMarkUnreachableBlocksPhase : public HPhase {
public:
explicit HMarkUnreachableBlocksPhase(HGraph* graph)
- : HPhase("H_Mark unrechable blocks", graph) { }
+ : HPhase("H_Mark unreachable blocks", graph) { }
void Run();
if_objectissmi.Else();
{
if (type->Is(Type::Smi())) {
- if_objectissmi.Deopt("Excepted smi");
+ if_objectissmi.Deopt("Expected smi");
} else {
// Check if the object is a heap number.
IfBuilder if_objectisnumber(this);
if (value != NULL && value->CheckFlag(HValue::kIsArguments)) {
builder->Bailout(kArgumentsObjectValueInATestContext);
}
- HBasicBlock* empty_true = builder->graph()->CreateBasicBlock();
- HBasicBlock* empty_false = builder->graph()->CreateBasicBlock();
ToBooleanStub::Types expected(condition()->to_boolean_types());
- builder->FinishCurrentBlock(builder->New<HBranch>(
- value, expected, empty_true, empty_false));
-
- owner()->Goto(empty_true, if_true(), builder->function_state());
- owner()->Goto(empty_false , if_false(), builder->function_state());
- builder->set_current_block(NULL);
+ ReturnControl(owner()->New<HBranch>(value, expected), BailoutId::None());
}