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 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4428 | 4428 |
4429 // Check if object matches find condition. | 4429 // Check if object matches find condition. |
4430 virtual bool FindObject(RawObject* obj) const; | 4430 virtual bool FindObject(RawObject* obj) const; |
4431 | 4431 |
4432 private: | 4432 private: |
4433 const uword pc_; | 4433 const uword pc_; |
4434 | 4434 |
4435 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); | 4435 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); |
4436 }; | 4436 }; |
4437 | 4437 |
| 4438 class SlowFindRawCodeVisitor : public FindObjectVisitor { |
| 4439 public: |
| 4440 explicit SlowFindRawCodeVisitor(uword pc) |
| 4441 : FindObjectVisitor(Isolate::Current()), pc_(pc) { } |
| 4442 virtual ~SlowFindRawCodeVisitor() { } |
| 4443 |
| 4444 // Check if object matches find condition. |
| 4445 virtual bool FindObject(RawObject* obj) const; |
| 4446 |
| 4447 private: |
| 4448 const uword pc_; |
| 4449 |
| 4450 DISALLOW_COPY_AND_ASSIGN(SlowFindRawCodeVisitor); |
| 4451 }; |
| 4452 |
4438 static bool IsOptimized(RawCode* code) { | 4453 static bool IsOptimized(RawCode* code) { |
4439 return Code::OptimizedBit::decode(code->ptr()->state_bits_); | 4454 return Code::OptimizedBit::decode(code->ptr()->state_bits_); |
4440 } | 4455 } |
4441 | 4456 |
4442 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT | 4457 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT |
4443 | 4458 |
4444 void set_compile_timestamp(int64_t timestamp) const { | 4459 void set_compile_timestamp(int64_t timestamp) const { |
4445 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp); | 4460 StoreNonPointer(&raw_ptr()->compile_timestamp_, timestamp); |
4446 } | 4461 } |
4447 | 4462 |
(...skipping 3757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8205 | 8220 |
8206 | 8221 |
8207 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8222 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8208 intptr_t index) { | 8223 intptr_t index) { |
8209 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8224 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8210 } | 8225 } |
8211 | 8226 |
8212 } // namespace dart | 8227 } // namespace dart |
8213 | 8228 |
8214 #endif // VM_OBJECT_H_ | 8229 #endif // VM_OBJECT_H_ |
OLD | NEW |