| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 8c672ba1c668ddfdc6b152d6d79a1825535d901a..c8fbbc7c87c1b6ed86de444588a196f8a280d05a 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -129,8 +129,7 @@ void HBasicBlock::RemovePhi(HPhi* phi) {
|
| }
|
|
|
|
|
| -void HBasicBlock::AddInstruction(HInstruction* instr,
|
| - HSourcePosition position) {
|
| +void HBasicBlock::AddInstruction(HInstruction* instr, SourcePosition position) {
|
| DCHECK(!IsStartBlock() || !IsFinished());
|
| DCHECK(!instr->IsLinked());
|
| DCHECK(!IsFinished());
|
| @@ -199,7 +198,7 @@ HSimulate* HBasicBlock::CreateSimulate(BailoutId ast_id,
|
| }
|
|
|
|
|
| -void HBasicBlock::Finish(HControlInstruction* end, HSourcePosition position) {
|
| +void HBasicBlock::Finish(HControlInstruction* end, SourcePosition position) {
|
| DCHECK(!IsFinished());
|
| AddInstruction(end, position);
|
| end_ = end;
|
| @@ -209,10 +208,8 @@ void HBasicBlock::Finish(HControlInstruction* end, HSourcePosition position) {
|
| }
|
|
|
|
|
| -void HBasicBlock::Goto(HBasicBlock* block,
|
| - HSourcePosition position,
|
| - FunctionState* state,
|
| - bool add_simulate) {
|
| +void HBasicBlock::Goto(HBasicBlock* block, SourcePosition position,
|
| + FunctionState* state, bool add_simulate) {
|
| bool drop_extra = state != NULL &&
|
| state->inlining_kind() == NORMAL_RETURN;
|
|
|
| @@ -231,9 +228,8 @@ void HBasicBlock::Goto(HBasicBlock* block,
|
| }
|
|
|
|
|
| -void HBasicBlock::AddLeaveInlined(HValue* return_value,
|
| - FunctionState* state,
|
| - HSourcePosition position) {
|
| +void HBasicBlock::AddLeaveInlined(HValue* return_value, FunctionState* state,
|
| + SourcePosition position) {
|
| HBasicBlock* target = state->function_return();
|
| bool drop_extra = state->inlining_kind() == NORMAL_RETURN;
|
|
|
| @@ -1029,7 +1025,7 @@ void HGraphBuilder::IfBuilder::End() {
|
| if (current->deopt_ && current->block_ != NULL) {
|
| current->block_->FinishExit(
|
| HAbnormalExit::New(builder()->isolate(), builder()->zone(), NULL),
|
| - HSourcePosition::Unknown());
|
| + SourcePosition::Unknown());
|
| }
|
| current = current->next_;
|
| }
|
| @@ -3422,7 +3418,7 @@ HBasicBlock* HOptimizedGraphBuilder::BuildLoopEntry(
|
|
|
|
|
| void HBasicBlock::FinishExit(HControlInstruction* instruction,
|
| - HSourcePosition position) {
|
| + SourcePosition position) {
|
| Finish(instruction, position);
|
| ClearEnvironment();
|
| }
|
| @@ -3457,8 +3453,7 @@ HGraph::HGraph(CompilationInfo* info)
|
| start_environment_ = new (zone_)
|
| HEnvironment(zone_, descriptor.GetEnvironmentParameterCount());
|
| } else {
|
| - info->TraceInlinedFunction(info->shared_info(),
|
| - HSourcePosition::Unknown().raw());
|
| + info->TraceInlinedFunction(info->shared_info(), SourcePosition::Unknown());
|
| start_environment_ =
|
| new(zone_) HEnvironment(NULL, info->scope(), info->closure(), zone_);
|
| }
|
| @@ -3486,7 +3481,7 @@ void HGraph::FinalizeUniqueness() {
|
| }
|
|
|
|
|
| -int HGraph::SourcePositionToScriptPosition(HSourcePosition pos) {
|
| +int HGraph::SourcePositionToScriptPosition(SourcePosition pos) {
|
| if (!FLAG_hydrogen_track_positions || pos.IsUnknown()) {
|
| return pos.raw();
|
| }
|
| @@ -3880,8 +3875,7 @@ void HGraph::CollectPhis() {
|
| // Implementation of utility class to encapsulate the translation state for
|
| // a (possibly inlined) function.
|
| FunctionState::FunctionState(HOptimizedGraphBuilder* owner,
|
| - CompilationInfo* info,
|
| - InliningKind inlining_kind,
|
| + CompilationInfo* info, InliningKind inlining_kind,
|
| int inlining_id)
|
| : owner_(owner),
|
| compilation_info_(info),
|
| @@ -3893,7 +3887,7 @@ FunctionState::FunctionState(HOptimizedGraphBuilder* owner,
|
| arguments_object_(NULL),
|
| arguments_elements_(NULL),
|
| inlining_id_(inlining_id),
|
| - outer_source_position_(HSourcePosition::Unknown()),
|
| + outer_source_position_(SourcePosition::Unknown()),
|
| outer_(owner->function_state()) {
|
| if (outer_ != NULL) {
|
| // State for an inline function.
|
| @@ -7816,10 +7810,9 @@ int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
|
| bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
|
| int arguments_count,
|
| HValue* implicit_return_value,
|
| - BailoutId ast_id,
|
| - BailoutId return_id,
|
| + BailoutId ast_id, BailoutId return_id,
|
| InliningKind inlining_kind,
|
| - HSourcePosition position) {
|
| + SourcePosition position) {
|
| int nodes_added = InliningAstSize(target);
|
| if (nodes_added == kNotInlinable) return false;
|
|
|
| @@ -7931,8 +7924,7 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
|
| DCHECK(target_shared->has_deoptimization_support());
|
| AstTyper::Run(&target_info);
|
|
|
| - int function_id =
|
| - top_info()->TraceInlinedFunction(target_shared, position.raw());
|
| + int function_id = top_info()->TraceInlinedFunction(target_shared, position);
|
|
|
| // Save the pending call context. Set up new one for the inlined function.
|
| // The function state is new-allocated because we need to delete it
|
| @@ -10939,15 +10931,9 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
|
|
|
|
|
| HControlInstruction* HOptimizedGraphBuilder::BuildCompareInstruction(
|
| - Token::Value op,
|
| - HValue* left,
|
| - HValue* right,
|
| - Type* left_type,
|
| - Type* right_type,
|
| - Type* combined_type,
|
| - HSourcePosition left_position,
|
| - HSourcePosition right_position,
|
| - PushBeforeSimulateBehavior push_sim_result,
|
| + Token::Value op, HValue* left, HValue* right, Type* left_type,
|
| + Type* right_type, Type* combined_type, SourcePosition left_position,
|
| + SourcePosition right_position, PushBeforeSimulateBehavior push_sim_result,
|
| BailoutId bailout_id) {
|
| // Cases handled below depend on collected type feedback. They should
|
| // soft deoptimize when there is no type feedback.
|
| @@ -13256,7 +13242,7 @@ void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) {
|
| if (FLAG_hydrogen_track_positions &&
|
| instruction->has_position() &&
|
| instruction->position().raw() != 0) {
|
| - const HSourcePosition pos = instruction->position();
|
| + const SourcePosition pos = instruction->position();
|
| os << " pos:";
|
| if (pos.inlining_id() != 0) os << pos.inlining_id() << "_";
|
| os << pos.position();
|
|
|