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

Unified Diff: runtime/vm/object.h

Issue 2723643002: Properly handle instantiator when allocating or cloning closure instance. (Closed)
Patch Set: Created 3 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 | « runtime/lib/function.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 50144c20cfc8402d21eca99731214f54b56b35c5..84656ed580b6ffe27148810bafbc507befec56b3 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -8302,17 +8302,17 @@ class LinkedHashMap : public Instance {
class Closure : public Instance {
public:
+ RawTypeArguments* instantiator() const { return raw_ptr()->instantiator_; }
+ static intptr_t instantiator_offset() {
+ return OFFSET_OF(RawClosure, instantiator_);
+ }
+
RawFunction* function() const { return raw_ptr()->function_; }
static intptr_t function_offset() { return OFFSET_OF(RawClosure, function_); }
RawContext* context() const { return raw_ptr()->context_; }
static intptr_t context_offset() { return OFFSET_OF(RawClosure, context_); }
- RawTypeArguments* instantiator() const { return raw_ptr()->instantiator_; }
- static intptr_t instantiator_offset() {
- return OFFSET_OF(RawClosure, instantiator_);
- }
-
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawClosure));
}
@@ -8324,7 +8324,8 @@ class Closure : public Instance {
return true;
}
- static RawClosure* New(const Function& function,
+ static RawClosure* New(const TypeArguments& instantiator,
+ const Function& function,
const Context& context,
Heap::Space space = Heap::kNew);
« no previous file with comments | « runtime/lib/function.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698