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

Unified Diff: src/hydrogen.h

Issue 928343003: CpuProfile: rename HSourcePosition to SourcePosition and move it to compiler.* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 10 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/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 431dc516e3b1a592e10ab4ecb9af3e730e586066..cf53d26cb70ed32b9c6a9755c3bb6bcbd56a7288 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -88,7 +88,7 @@ class HBasicBlock FINAL : public ZoneObject {
bool IsFinished() const { return end_ != NULL; }
void AddPhi(HPhi* phi);
void RemovePhi(HPhi* phi);
- void AddInstruction(HInstruction* instr, HSourcePosition position);
+ void AddInstruction(HInstruction* instr, SourcePosition position);
bool Dominates(HBasicBlock* other) const;
bool EqualToOrDominates(HBasicBlock* other) const;
int LoopNestingDepth() const;
@@ -114,8 +114,7 @@ class HBasicBlock FINAL : public ZoneObject {
int PredecessorIndexOf(HBasicBlock* predecessor) const;
HPhi* AddNewPhi(int merged_index);
- HSimulate* AddNewSimulate(BailoutId ast_id,
- HSourcePosition position,
+ HSimulate* AddNewSimulate(BailoutId ast_id, SourcePosition position,
RemovableSimulate removable = FIXED_SIMULATE) {
HSimulate* instr = CreateSimulate(ast_id, removable);
AddInstruction(instr, position);
@@ -167,21 +166,18 @@ class HBasicBlock FINAL : public ZoneObject {
friend class HGraphBuilder;
HSimulate* CreateSimulate(BailoutId ast_id, RemovableSimulate removable);
- void Finish(HControlInstruction* last, HSourcePosition position);
- void FinishExit(HControlInstruction* instruction, HSourcePosition position);
- void Goto(HBasicBlock* block,
- HSourcePosition position,
- FunctionState* state = NULL,
- bool add_simulate = true);
- void GotoNoSimulate(HBasicBlock* block, HSourcePosition position) {
+ void Finish(HControlInstruction* last, SourcePosition position);
+ void FinishExit(HControlInstruction* instruction, SourcePosition position);
+ void Goto(HBasicBlock* block, SourcePosition position,
+ FunctionState* state = NULL, bool add_simulate = true);
+ void GotoNoSimulate(HBasicBlock* block, SourcePosition position) {
Goto(block, position, NULL, false);
}
// Add the inlined function exit sequence, adding an HLeaveInlined
// instruction and updating the bailout environment.
- void AddLeaveInlined(HValue* return_value,
- FunctionState* state,
- HSourcePosition position);
+ void AddLeaveInlined(HValue* return_value, FunctionState* state,
+ SourcePosition position);
private:
void RegisterPredecessor(HBasicBlock* pred);
@@ -461,11 +457,11 @@ class HGraph FINAL : public ZoneObject {
// identifier to each inlining and dumps function source if it was inlined
// for the first time during the current optimization.
int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
- HSourcePosition position);
+ SourcePosition position);
- // Converts given HSourcePosition to the absolute offset from the start of
+ // Converts given SourcePosition to the absolute offset from the start of
// the corresponding script.
- int SourcePositionToScriptPosition(HSourcePosition position);
+ int SourcePositionToScriptPosition(SourcePosition position);
private:
HConstant* ReinsertConstantIfNecessary(HConstant* constant);
@@ -941,7 +937,7 @@ class FunctionState FINAL {
HArgumentsElements* arguments_elements_;
int inlining_id_;
- HSourcePosition outer_source_position_;
+ SourcePosition outer_source_position_;
FunctionState* outer_;
};
@@ -1029,7 +1025,7 @@ class HGraphBuilder {
graph_(NULL),
current_block_(NULL),
scope_(info->scope()),
- position_(HSourcePosition::Unknown()),
+ position_(SourcePosition::Unknown()),
start_position_(0) {}
virtual ~HGraphBuilder() {}
@@ -1885,18 +1881,16 @@ class HGraphBuilder {
}
// Convert the given absolute offset from the start of the script to
- // the HSourcePosition assuming that this position corresponds to the
+ // the SourcePosition assuming that this position corresponds to the
// same function as current position_.
- HSourcePosition ScriptPositionToSourcePosition(int position) {
- HSourcePosition pos = position_;
+ SourcePosition ScriptPositionToSourcePosition(int position) {
+ SourcePosition pos = position_;
pos.set_position(position - start_position_);
return pos;
}
- HSourcePosition source_position() { return position_; }
- void set_source_position(HSourcePosition position) {
- position_ = position;
- }
+ SourcePosition source_position() { return position_; }
+ void set_source_position(SourcePosition position) { position_ = position; }
template <typename ViewClass>
void BuildArrayBufferViewInitialization(HValue* obj,
@@ -1916,7 +1910,7 @@ class HGraphBuilder {
HGraph* graph_;
HBasicBlock* current_block_;
Scope* scope_;
- HSourcePosition position_;
+ SourcePosition position_;
int start_position_;
};
@@ -2325,13 +2319,10 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
Handle<JSFunction> target);
int InliningAstSize(Handle<JSFunction> target);
- bool TryInline(Handle<JSFunction> target,
- int arguments_count,
- HValue* implicit_return_value,
- BailoutId ast_id,
- BailoutId return_id,
- InliningKind inlining_kind,
- HSourcePosition position);
+ bool TryInline(Handle<JSFunction> target, int arguments_count,
+ HValue* implicit_return_value, BailoutId ast_id,
+ BailoutId return_id, InliningKind inlining_kind,
+ SourcePosition position);
bool TryInlineCall(Call* expr);
bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value);
@@ -2597,15 +2588,9 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
};
HControlInstruction* 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);
HInstruction* BuildStringCharCodeAt(HValue* string,
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698