OLD | NEW |
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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 RawCode* closure_allocation_stub() const; | 1388 RawCode* closure_allocation_stub() const; |
1389 void set_closure_allocation_stub(const Code& value) const; | 1389 void set_closure_allocation_stub(const Code& value) const; |
1390 | 1390 |
1391 void set_extracted_method_closure(const Function& function) const; | 1391 void set_extracted_method_closure(const Function& function) const; |
1392 RawFunction* extracted_method_closure() const; | 1392 RawFunction* extracted_method_closure() const; |
1393 | 1393 |
1394 bool IsMethodExtractor() const { | 1394 bool IsMethodExtractor() const { |
1395 return kind() == RawFunction::kMethodExtractor; | 1395 return kind() == RawFunction::kMethodExtractor; |
1396 } | 1396 } |
1397 | 1397 |
1398 bool IsNoSuchMethodDispatcher() const { | |
1399 return kind() == RawFunction::kNoSuchMethodDispatcher; | |
1400 } | |
1401 | |
1402 // Returns true iff an implicit closure function has been created | 1398 // Returns true iff an implicit closure function has been created |
1403 // for this function. | 1399 // for this function. |
1404 bool HasImplicitClosureFunction() const { | 1400 bool HasImplicitClosureFunction() const { |
1405 return implicit_closure_function() != null(); | 1401 return implicit_closure_function() != null(); |
1406 } | 1402 } |
1407 | 1403 |
1408 // Return the closure function implicitly created for this function. | 1404 // Return the closure function implicitly created for this function. |
1409 // If none exists yet, create one and remember it. | 1405 // If none exists yet, create one and remember it. |
1410 RawFunction* ImplicitClosureFunction() const; | 1406 RawFunction* ImplicitClosureFunction() const; |
1411 | 1407 |
(...skipping 24 matching lines...) Expand all Loading... |
1436 if (is_static() || is_abstract()) { | 1432 if (is_static() || is_abstract()) { |
1437 return false; | 1433 return false; |
1438 } | 1434 } |
1439 switch (kind()) { | 1435 switch (kind()) { |
1440 case RawFunction::kRegularFunction: | 1436 case RawFunction::kRegularFunction: |
1441 case RawFunction::kGetterFunction: | 1437 case RawFunction::kGetterFunction: |
1442 case RawFunction::kSetterFunction: | 1438 case RawFunction::kSetterFunction: |
1443 case RawFunction::kImplicitGetter: | 1439 case RawFunction::kImplicitGetter: |
1444 case RawFunction::kImplicitSetter: | 1440 case RawFunction::kImplicitSetter: |
1445 case RawFunction::kMethodExtractor: | 1441 case RawFunction::kMethodExtractor: |
1446 case RawFunction::kNoSuchMethodDispatcher: | |
1447 return true; | 1442 return true; |
1448 case RawFunction::kClosureFunction: | 1443 case RawFunction::kClosureFunction: |
1449 case RawFunction::kConstructor: | 1444 case RawFunction::kConstructor: |
1450 case RawFunction::kConstImplicitGetter: | 1445 case RawFunction::kConstImplicitGetter: |
1451 return false; | 1446 return false; |
1452 default: | 1447 default: |
1453 UNREACHABLE(); | 1448 UNREACHABLE(); |
1454 return false; | 1449 return false; |
1455 } | 1450 } |
1456 } | 1451 } |
(...skipping 4479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5936 | 5931 |
5937 | 5932 |
5938 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5933 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
5939 intptr_t index) { | 5934 intptr_t index) { |
5940 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5935 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
5941 } | 5936 } |
5942 | 5937 |
5943 } // namespace dart | 5938 } // namespace dart |
5944 | 5939 |
5945 #endif // VM_OBJECT_H_ | 5940 #endif // VM_OBJECT_H_ |
OLD | NEW |