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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 878243002: Cleanup: use const reference for ParsedFunction where possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
===================================================================
--- runtime/vm/flow_graph_builder.h (revision 43213)
+++ runtime/vm/flow_graph_builder.h (working copy)
@@ -139,19 +139,19 @@
// Build a flow graph from a parsed function's AST.
-class FlowGraphBuilder: public ValueObject {
+class FlowGraphBuilder : public ValueObject {
public:
// The inlining context is NULL if not inlining. The osr_id is the deopt
// id of the OSR entry or Isolate::kNoDeoptId if not compiling for OSR.
- FlowGraphBuilder(ParsedFunction* parsed_function,
+ FlowGraphBuilder(const ParsedFunction& parsed_function,
const ZoneGrowableArray<const ICData*>& ic_data_array,
InlineExitCollector* exit_collector,
intptr_t osr_id);
FlowGraph* BuildGraph();
- ParsedFunction* parsed_function() const { return parsed_function_; }
- const Function& function() const { return parsed_function_->function(); }
+ const ParsedFunction& parsed_function() const { return parsed_function_; }
+ const Function& function() const { return parsed_function_.function(); }
const ZoneGrowableArray<const ICData*>& ic_data_array() const {
return ic_data_array_;
}
@@ -203,11 +203,11 @@
InlineExitCollector* exit_collector() const { return exit_collector_; }
ZoneGrowableArray<const Field*>* guarded_fields() const {
- return parsed_function_->guarded_fields();
+ return parsed_function_.guarded_fields();
}
ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes() const {
- return parsed_function_->deferred_prefixes();
+ return parsed_function_.deferred_prefixes();
}
intptr_t temp_count() const { return temp_count_; }
@@ -229,7 +229,7 @@
// Returns address where the constant 'value' is stored or 0 if not found.
static uword FindDoubleConstant(double value);
- Isolate* isolate() const { return parsed_function()->isolate(); }
+ Isolate* isolate() const { return parsed_function().isolate(); }
private:
friend class NestedStatement; // Explicit access to nesting_stack_.
@@ -242,7 +242,7 @@
return parameter_count() + num_stack_locals_;
}
- ParsedFunction* parsed_function_;
+ const ParsedFunction& parsed_function_;
const ZoneGrowableArray<const ICData*>& ic_data_array_;
const intptr_t num_copied_params_;
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698