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

Unified Diff: src/crankshaft/hydrogen.h

Issue 2377283002: [crankshaft] Move is_tracking_positions predicate. (Closed)
Patch Set: Created 4 years, 3 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/compilation-info.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.h
diff --git a/src/crankshaft/hydrogen.h b/src/crankshaft/hydrogen.h
index e86477361e8dc50c39320638dae75bfa392e5ecf..d2f1637d113a250eead2d6d096bac29cd849cdfe 100644
--- a/src/crankshaft/hydrogen.h
+++ b/src/crankshaft/hydrogen.h
@@ -1065,14 +1065,16 @@ class HAllocationMode final BASE_EMBEDDED {
class HGraphBuilder {
public:
explicit HGraphBuilder(CompilationInfo* info,
- CallInterfaceDescriptor descriptor)
+ CallInterfaceDescriptor descriptor,
+ bool track_positions)
: info_(info),
descriptor_(descriptor),
graph_(NULL),
current_block_(NULL),
scope_(info->scope()),
position_(SourcePosition::Unknown()),
- start_position_(0) {}
+ start_position_(0),
+ track_positions_(track_positions) {}
virtual ~HGraphBuilder() {}
Scope* scope() const { return scope_; }
@@ -1874,7 +1876,7 @@ class HGraphBuilder {
}
void EnterInlinedSource(int start_position, int id) {
- if (top_info()->is_tracking_positions()) {
+ if (is_tracking_positions()) {
start_position_ = start_position;
position_.set_inlining_id(id);
}
@@ -1895,6 +1897,8 @@ class HGraphBuilder {
SourcePosition source_position() { return position_; }
void set_source_position(SourcePosition position) { position_ = position; }
+ bool is_tracking_positions() { return track_positions_; }
+
int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
SourcePosition position);
@@ -1920,6 +1924,7 @@ class HGraphBuilder {
Scope* scope_;
SourcePosition position_;
int start_position_;
+ bool track_positions_;
};
template <>
@@ -2117,7 +2122,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
BreakAndContinueScope* next_;
};
- explicit HOptimizedGraphBuilder(CompilationInfo* info);
+ explicit HOptimizedGraphBuilder(CompilationInfo* info, bool track_positions);
bool BuildGraph() override;
« no previous file with comments | « src/compilation-info.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698