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