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 6451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6462 } | 6462 } |
6463 static intptr_t NextFieldOffset() { | 6463 static intptr_t NextFieldOffset() { |
6464 // Indicates this class cannot be extended by dart code. | 6464 // Indicates this class cannot be extended by dart code. |
6465 return -kWordSize; | 6465 return -kWordSize; |
6466 } | 6466 } |
6467 | 6467 |
6468 friend class Class; | 6468 friend class Class; |
6469 }; | 6469 }; |
6470 | 6470 |
6471 | 6471 |
6472 class Capability : public Instance { | |
6473 public: | |
6474 uint64_t Id() const { return raw_ptr()->id_; } | |
6475 | |
6476 static intptr_t InstanceSize() { | |
6477 return RoundedAllocationSize(sizeof(RawCapability)); | |
6478 } | |
6479 static RawCapability* New(uint64_t id, Heap::Space space = Heap::kNew); | |
6480 | |
6481 private: | |
6482 FINAL_HEAP_OBJECT_IMPLEMENTATION(Capability, Instance); | |
6483 friend class Class; | |
6484 }; | |
6485 | |
6486 | |
6487 class ReceivePort: public Instance { | |
Cutch
2014/04/22 20:15:22
missing space before :
Ivan Posva
2014/04/22 21:28:30
Done.
| |
6488 public: | |
6489 Dart_Port Id() const { return raw_ptr()->send_port_->ptr()->id_; } | |
siva
2014/04/23 00:20:31
maybe
send_port()->ptr()->id_;
| |
6490 | |
6491 RawSendPort* send_port() const { return raw_ptr()->send_port_; } | |
6492 | |
6493 RawInstance* handler() const { return raw_ptr()->handler_; } | |
6494 void set_handler(const Instance& value); | |
siva
2014/04/23 00:20:31
where is set_handler implemented ?
maybe it should
| |
6495 | |
6496 static intptr_t InstanceSize() { | |
6497 return RoundedAllocationSize(sizeof(RawReceivePort)); | |
6498 } | |
6499 static RawReceivePort* New(Dart_Port id, Heap::Space space = Heap::kNew); | |
6500 | |
6501 private: | |
6502 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); | |
6503 friend class Class; | |
6504 }; | |
6505 | |
6506 | |
6507 class SendPort : public Instance { | |
6508 public: | |
6509 Dart_Port Id() const { return raw_ptr()->id_; } | |
6510 | |
6511 static intptr_t InstanceSize() { | |
6512 return RoundedAllocationSize(sizeof(RawSendPort)); | |
6513 } | |
6514 static RawSendPort* New(Dart_Port id, Heap::Space space = Heap::kNew); | |
6515 | |
6516 private: | |
6517 FINAL_HEAP_OBJECT_IMPLEMENTATION(SendPort, Instance); | |
6518 friend class Class; | |
6519 }; | |
6520 | |
6521 | |
6472 // Internal stacktrace object used in exceptions for printing stack traces. | 6522 // Internal stacktrace object used in exceptions for printing stack traces. |
6473 class Stacktrace : public Instance { | 6523 class Stacktrace : public Instance { |
6474 public: | 6524 public: |
6475 static const int kPreallocatedStackdepth = 10; | 6525 static const int kPreallocatedStackdepth = 10; |
6476 | 6526 |
6477 intptr_t Length() const; | 6527 intptr_t Length() const; |
6478 | 6528 |
6479 RawFunction* FunctionAtFrame(intptr_t frame_index) const; | 6529 RawFunction* FunctionAtFrame(intptr_t frame_index) const; |
6480 | 6530 |
6481 RawCode* CodeAtFrame(intptr_t frame_index) const; | 6531 RawCode* CodeAtFrame(intptr_t frame_index) const; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6835 | 6885 |
6836 | 6886 |
6837 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6887 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6838 intptr_t index) { | 6888 intptr_t index) { |
6839 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6889 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6840 } | 6890 } |
6841 | 6891 |
6842 } // namespace dart | 6892 } // namespace dart |
6843 | 6893 |
6844 #endif // VM_OBJECT_H_ | 6894 #endif // VM_OBJECT_H_ |
OLD | NEW |