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

Unified Diff: runtime/vm/parser.h

Issue 306643002: Pass isolates explicitly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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_inliner.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 36738)
+++ runtime/vm/parser.h (working copy)
@@ -38,12 +38,12 @@
// The class ParsedFunction holds the result of parsing a function.
class ParsedFunction : public ZoneAllocated {
public:
- explicit ParsedFunction(const Function& function)
+ ParsedFunction(Isolate* isolate, const Function& function)
: function_(function),
- code_(Code::Handle(function.unoptimized_code())),
+ code_(Code::Handle(isolate, function.unoptimized_code())),
node_sequence_(NULL),
instantiator_(NULL),
- default_parameter_values_(Array::ZoneHandle()),
+ default_parameter_values_(Array::ZoneHandle(isolate, Array::null())),
saved_current_context_var_(NULL),
saved_entry_context_var_(NULL),
expression_temp_var_(NULL),
@@ -51,7 +51,8 @@
first_parameter_index_(0),
first_stack_local_index_(0),
num_copied_params_(0),
- num_stack_locals_(0) {
+ num_stack_locals_(0),
+ isolate_(isolate) {
ASSERT(function.IsZoneHandle());
}
@@ -120,6 +121,8 @@
void AllocateVariables();
+ Isolate* isolate() const { return isolate_; }
+
private:
const Function& function_;
Code& code_;
@@ -136,6 +139,8 @@
int num_copied_params_;
int num_stack_locals_;
+ Isolate* isolate_;
+
DISALLOW_COPY_AND_ASSIGN(ParsedFunction);
};
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698