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

Unified Diff: runtime/vm/flow_graph.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/compiler.cc ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.h
===================================================================
--- runtime/vm/flow_graph.h (revision 43213)
+++ runtime/vm/flow_graph.h (working copy)
@@ -84,25 +84,25 @@
// Class to encapsulate the construction and manipulation of the flow graph.
class FlowGraph : public ZoneAllocated {
public:
- FlowGraph(ParsedFunction* parsed_function,
+ FlowGraph(const ParsedFunction& parsed_function,
GraphEntryInstr* graph_entry,
intptr_t max_block_id);
// Function properties.
- ParsedFunction* parsed_function() const {
+ const ParsedFunction& parsed_function() const {
return parsed_function_;
}
const Function& function() const {
- return parsed_function_->function();
+ return parsed_function_.function();
}
intptr_t parameter_count() const {
return num_copied_params_ + num_non_copied_params_;
}
intptr_t variable_count() const {
- return parameter_count() + parsed_function_->num_stack_locals();
+ return parameter_count() + parsed_function_.num_stack_locals();
}
intptr_t num_stack_locals() const {
- return parsed_function_->num_stack_locals();
+ return parsed_function_.num_stack_locals();
}
intptr_t num_copied_params() const {
return num_copied_params_;
@@ -115,11 +115,11 @@
}
LocalVariable* CurrentContextVar() const {
- return parsed_function()->current_context_var();
+ return parsed_function().current_context_var();
}
intptr_t CurrentContextEnvIndex() const {
- return parsed_function()->current_context_var()->BitIndexIn(
+ return parsed_function().current_context_var()->BitIndexIn(
num_non_copied_params_);
}
@@ -342,7 +342,7 @@
intptr_t max_block_id_;
// Flow graph fields.
- ParsedFunction* parsed_function_;
+ const ParsedFunction& parsed_function_;
const intptr_t num_copied_params_;
const intptr_t num_non_copied_params_;
GraphEntryInstr* graph_entry_;
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698