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

Side by Side Diff: runtime/vm/object.h

Issue 178233003: Allocate instance closures similarly to regular closures, i.e. without a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 RawContextScope* context_scope() const; 1503 RawContextScope* context_scope() const;
1504 void set_context_scope(const ContextScope& value) const; 1504 void set_context_scope(const ContextScope& value) const;
1505 1505
1506 // Enclosing function of this local function. 1506 // Enclosing function of this local function.
1507 RawFunction* parent_function() const; 1507 RawFunction* parent_function() const;
1508 1508
1509 // Signature class of this closure function or signature function. 1509 // Signature class of this closure function or signature function.
1510 RawClass* signature_class() const; 1510 RawClass* signature_class() const;
1511 void set_signature_class(const Class& value) const; 1511 void set_signature_class(const Class& value) const;
1512 1512
1513 RawCode* closure_allocation_stub() const;
1514 void set_closure_allocation_stub(const Code& value) const;
1515
1516 void set_extracted_method_closure(const Function& function) const; 1513 void set_extracted_method_closure(const Function& function) const;
1517 RawFunction* extracted_method_closure() const; 1514 RawFunction* extracted_method_closure() const;
1518 1515
1519 void set_saved_args_desc(const Array& array) const; 1516 void set_saved_args_desc(const Array& array) const;
1520 RawArray* saved_args_desc() const; 1517 RawArray* saved_args_desc() const;
1521 1518
1522 void set_saved_static_field(const Field& array) const; 1519 void set_saved_static_field(const Field& array) const;
1523 RawField* saved_static_field() const; 1520 RawField* saved_static_field() const;
1524 1521
1525 bool IsMethodExtractor() const { 1522 bool IsMethodExtractor() const {
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 1997
2001 // Signature class of this closure function or signature function. 1998 // Signature class of this closure function or signature function.
2002 RawClass* signature_class() const { return raw_ptr()->signature_class_; } 1999 RawClass* signature_class() const { return raw_ptr()->signature_class_; }
2003 void set_signature_class(const Class& value) const; 2000 void set_signature_class(const Class& value) const;
2004 2001
2005 RawInstance* implicit_static_closure() const { 2002 RawInstance* implicit_static_closure() const {
2006 return raw_ptr()->closure_; 2003 return raw_ptr()->closure_;
2007 } 2004 }
2008 void set_implicit_static_closure(const Instance& closure) const; 2005 void set_implicit_static_closure(const Instance& closure) const;
2009 2006
2010 RawCode* closure_allocation_stub() const {
2011 return raw_ptr()->closure_allocation_stub_;
2012 }
2013 void set_closure_allocation_stub(const Code& value) const;
2014
2015 static RawClosureData* New(); 2007 static RawClosureData* New();
2016 2008
2017 FINAL_HEAP_OBJECT_IMPLEMENTATION(ClosureData, Object); 2009 FINAL_HEAP_OBJECT_IMPLEMENTATION(ClosureData, Object);
2018 friend class Class; 2010 friend class Class;
2019 friend class Function; 2011 friend class Function;
2020 friend class HeapProfiler; 2012 friend class HeapProfiler;
2021 }; 2013 };
2022 2014
2023 2015
2024 class RedirectionData: public Object { 2016 class RedirectionData: public Object {
(...skipping 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after
6656 6648
6657 6649
6658 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6650 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6659 intptr_t index) { 6651 intptr_t index) {
6660 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6652 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6661 } 6653 }
6662 6654
6663 } // namespace dart 6655 } // namespace dart
6664 6656
6665 #endif // VM_OBJECT_H_ 6657 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698