Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: runtime/vm/object.h

Issue 110883016: - Allow to pre-filter before calling the FindObjectVisitor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
3361 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {}; 3361 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {};
3362 class AliveBit : public BitField<bool, kAliveBit, 1> {}; 3362 class AliveBit : public BitField<bool, kAliveBit, 1> {};
3363 3363
3364 // An object finder visitor interface. 3364 // An object finder visitor interface.
3365 class FindRawCodeVisitor : public FindObjectVisitor { 3365 class FindRawCodeVisitor : public FindObjectVisitor {
3366 public: 3366 public:
3367 explicit FindRawCodeVisitor(uword pc) 3367 explicit FindRawCodeVisitor(uword pc)
3368 : FindObjectVisitor(Isolate::Current()), pc_(pc) { } 3368 : FindObjectVisitor(Isolate::Current()), pc_(pc) { }
3369 virtual ~FindRawCodeVisitor() { } 3369 virtual ~FindRawCodeVisitor() { }
3370 3370
3371 virtual uword filter_addr() const { return pc_; }
3372
3371 // Check if object matches find condition. 3373 // Check if object matches find condition.
3372 virtual bool FindObject(RawObject* obj); 3374 virtual bool FindObject(RawObject* obj) const;
3373 3375
3374 private: 3376 private:
3375 const uword pc_; 3377 const uword pc_;
3376 3378
3377 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor); 3379 DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
3378 }; 3380 };
3379 3381
3380 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT 3382 static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT
3381 3383
3382 void set_instructions(RawInstructions* instructions) { 3384 void set_instructions(RawInstructions* instructions) {
(...skipping 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after
6569 6571
6570 6572
6571 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6573 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6572 intptr_t index) { 6574 intptr_t index) {
6573 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6575 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6574 } 6576 }
6575 6577
6576 } // namespace dart 6578 } // namespace dart
6577 6579
6578 #endif // VM_OBJECT_H_ 6580 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698