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

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

Issue 23441073: Implement closurization of regular methods in ObjectMirror.getField in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 2 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/flow_graph_builder.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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 RawContextScope* context_scope() const; 1461 RawContextScope* context_scope() const;
1462 void set_context_scope(const ContextScope& value) const; 1462 void set_context_scope(const ContextScope& value) const;
1463 1463
1464 // Enclosing function of this local function. 1464 // Enclosing function of this local function.
1465 RawFunction* parent_function() const; 1465 RawFunction* parent_function() const;
1466 1466
1467 // Signature class of this closure function or signature function. 1467 // Signature class of this closure function or signature function.
1468 RawClass* signature_class() const; 1468 RawClass* signature_class() const;
1469 void set_signature_class(const Class& value) const; 1469 void set_signature_class(const Class& value) const;
1470 1470
1471 RawInstance* implicit_static_closure() const;
1472 void set_implicit_static_closure(const Instance& closure) const;
1473
1474 RawCode* closure_allocation_stub() const; 1471 RawCode* closure_allocation_stub() const;
1475 void set_closure_allocation_stub(const Code& value) const; 1472 void set_closure_allocation_stub(const Code& value) const;
1476 1473
1477 void set_extracted_method_closure(const Function& function) const; 1474 void set_extracted_method_closure(const Function& function) const;
1478 RawFunction* extracted_method_closure() const; 1475 RawFunction* extracted_method_closure() const;
1479 1476
1480 void set_saved_args_desc(const Array& array) const; 1477 void set_saved_args_desc(const Array& array) const;
1481 RawArray* saved_args_desc() const; 1478 RawArray* saved_args_desc() const;
1482 1479
1483 bool IsMethodExtractor() const { 1480 bool IsMethodExtractor() const {
(...skipping 11 matching lines...) Expand all
1495 // Returns true iff an implicit closure function has been created 1492 // Returns true iff an implicit closure function has been created
1496 // for this function. 1493 // for this function.
1497 bool HasImplicitClosureFunction() const { 1494 bool HasImplicitClosureFunction() const {
1498 return implicit_closure_function() != null(); 1495 return implicit_closure_function() != null();
1499 } 1496 }
1500 1497
1501 // Return the closure function implicitly created for this function. 1498 // Return the closure function implicitly created for this function.
1502 // If none exists yet, create one and remember it. 1499 // If none exists yet, create one and remember it.
1503 RawFunction* ImplicitClosureFunction() const; 1500 RawFunction* ImplicitClosureFunction() const;
1504 1501
1502 // Return the closure implicitly created for this function.
1503 // If none exists yet, create one and remember it.
1504 RawInstance* ImplicitStaticClosure() const;
1505
1505 // Redirection information for a redirecting factory. 1506 // Redirection information for a redirecting factory.
1506 bool IsRedirectingFactory() const; 1507 bool IsRedirectingFactory() const;
1507 RawType* RedirectionType() const; 1508 RawType* RedirectionType() const;
1508 void SetRedirectionType(const Type& type) const; 1509 void SetRedirectionType(const Type& type) const;
1509 RawString* RedirectionIdentifier() const; 1510 RawString* RedirectionIdentifier() const;
1510 void SetRedirectionIdentifier(const String& identifier) const; 1511 void SetRedirectionIdentifier(const String& identifier) const;
1511 RawFunction* RedirectionTarget() const; 1512 RawFunction* RedirectionTarget() const;
1512 void SetRedirectionTarget(const Function& target) const; 1513 void SetRedirectionTarget(const Function& target) const;
1513 1514
1514 RawFunction::Kind kind() const { 1515 RawFunction::Kind kind() const {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 1856
1856 void set_name(const String& value) const; 1857 void set_name(const String& value) const;
1857 void set_kind(RawFunction::Kind value) const; 1858 void set_kind(RawFunction::Kind value) const;
1858 void set_is_static(bool value) const; 1859 void set_is_static(bool value) const;
1859 void set_is_const(bool value) const; 1860 void set_is_const(bool value) const;
1860 void set_is_external(bool value) const; 1861 void set_is_external(bool value) const;
1861 void set_parent_function(const Function& value) const; 1862 void set_parent_function(const Function& value) const;
1862 void set_owner(const Object& value) const; 1863 void set_owner(const Object& value) const;
1863 RawFunction* implicit_closure_function() const; 1864 RawFunction* implicit_closure_function() const;
1864 void set_implicit_closure_function(const Function& value) const; 1865 void set_implicit_closure_function(const Function& value) const;
1866 RawInstance* implicit_static_closure() const;
1867 void set_implicit_static_closure(const Instance& closure) const;
1865 void set_num_optional_parameters(intptr_t value) const; // Encoded value. 1868 void set_num_optional_parameters(intptr_t value) const; // Encoded value.
1866 void set_kind_tag(intptr_t value) const; 1869 void set_kind_tag(intptr_t value) const;
1867 void set_data(const Object& value) const; 1870 void set_data(const Object& value) const;
1868 static RawFunction* New(); 1871 static RawFunction* New();
1869 1872
1870 void BuildSignatureParameters(bool instantiate, 1873 void BuildSignatureParameters(bool instantiate,
1871 NameVisibility name_visibility, 1874 NameVisibility name_visibility,
1872 const AbstractTypeArguments& instantiator, 1875 const AbstractTypeArguments& instantiator,
1873 const GrowableObjectArray& pieces) const; 1876 const GrowableObjectArray& pieces) const;
1874 RawString* BuildSignature(bool instantiate, 1877 RawString* BuildSignature(bool instantiate,
(...skipping 4317 matching lines...) Expand 10 before | Expand all | Expand 10 after
6192 6195
6193 6196
6194 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6197 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6195 intptr_t index) { 6198 intptr_t index) {
6196 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6199 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6197 } 6200 }
6198 6201
6199 } // namespace dart 6202 } // namespace dart
6200 6203
6201 #endif // VM_OBJECT_H_ 6204 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698