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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2426 case RawFunction::kRegularFunction: | 2426 case RawFunction::kRegularFunction: |
2427 case RawFunction::kGetterFunction: | 2427 case RawFunction::kGetterFunction: |
2428 case RawFunction::kSetterFunction: | 2428 case RawFunction::kSetterFunction: |
2429 case RawFunction::kImplicitGetter: | 2429 case RawFunction::kImplicitGetter: |
2430 case RawFunction::kImplicitSetter: | 2430 case RawFunction::kImplicitSetter: |
2431 case RawFunction::kMethodExtractor: | 2431 case RawFunction::kMethodExtractor: |
2432 case RawFunction::kNoSuchMethodDispatcher: | 2432 case RawFunction::kNoSuchMethodDispatcher: |
2433 case RawFunction::kInvokeFieldDispatcher: | 2433 case RawFunction::kInvokeFieldDispatcher: |
2434 return true; | 2434 return true; |
2435 case RawFunction::kClosureFunction: | 2435 case RawFunction::kClosureFunction: |
| 2436 case RawFunction::kSignatureFunction: |
2436 case RawFunction::kConstructor: | 2437 case RawFunction::kConstructor: |
2437 case RawFunction::kImplicitStaticFinalGetter: | 2438 case RawFunction::kImplicitStaticFinalGetter: |
2438 case RawFunction::kIrregexpFunction: | 2439 case RawFunction::kIrregexpFunction: |
2439 return false; | 2440 return false; |
2440 default: | 2441 default: |
2441 UNREACHABLE(); | 2442 UNREACHABLE(); |
2442 return false; | 2443 return false; |
2443 } | 2444 } |
2444 } | 2445 } |
2445 bool IsStaticFunction() const { | 2446 bool IsStaticFunction() const { |
2446 if (!is_static()) { | 2447 if (!is_static()) { |
2447 return false; | 2448 return false; |
2448 } | 2449 } |
2449 switch (kind()) { | 2450 switch (kind()) { |
2450 case RawFunction::kRegularFunction: | 2451 case RawFunction::kRegularFunction: |
2451 case RawFunction::kGetterFunction: | 2452 case RawFunction::kGetterFunction: |
2452 case RawFunction::kSetterFunction: | 2453 case RawFunction::kSetterFunction: |
2453 case RawFunction::kImplicitGetter: | 2454 case RawFunction::kImplicitGetter: |
2454 case RawFunction::kImplicitSetter: | 2455 case RawFunction::kImplicitSetter: |
2455 case RawFunction::kImplicitStaticFinalGetter: | 2456 case RawFunction::kImplicitStaticFinalGetter: |
2456 case RawFunction::kIrregexpFunction: | 2457 case RawFunction::kIrregexpFunction: |
2457 return true; | 2458 return true; |
2458 case RawFunction::kClosureFunction: | 2459 case RawFunction::kClosureFunction: |
| 2460 case RawFunction::kSignatureFunction: |
2459 case RawFunction::kConstructor: | 2461 case RawFunction::kConstructor: |
| 2462 case RawFunction::kMethodExtractor: |
| 2463 case RawFunction::kNoSuchMethodDispatcher: |
| 2464 case RawFunction::kInvokeFieldDispatcher: |
2460 return false; | 2465 return false; |
2461 default: | 2466 default: |
2462 UNREACHABLE(); | 2467 UNREACHABLE(); |
2463 return false; | 2468 return false; |
2464 } | 2469 } |
2465 } | 2470 } |
2466 bool IsInFactoryScope() const; | 2471 bool IsInFactoryScope() const; |
2467 | 2472 |
2468 TokenPosition token_pos() const { | 2473 TokenPosition token_pos() const { |
2469 #if defined(DART_PRECOMPILED_RUNTIME) | 2474 #if defined(DART_PRECOMPILED_RUNTIME) |
(...skipping 6514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8984 | 8989 |
8985 inline void TypeArguments::SetHash(intptr_t value) const { | 8990 inline void TypeArguments::SetHash(intptr_t value) const { |
8986 // This is only safe because we create a new Smi, which does not cause | 8991 // This is only safe because we create a new Smi, which does not cause |
8987 // heap allocation. | 8992 // heap allocation. |
8988 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8993 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8989 } | 8994 } |
8990 | 8995 |
8991 } // namespace dart | 8996 } // namespace dart |
8992 | 8997 |
8993 #endif // RUNTIME_VM_OBJECT_H_ | 8998 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |