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

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

Issue 150923002: Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not inval… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
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 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 } 3197 }
3198 3198
3199 bool is_optimized() const { 3199 bool is_optimized() const {
3200 return OptimizedBit::decode(raw_ptr()->state_bits_); 3200 return OptimizedBit::decode(raw_ptr()->state_bits_);
3201 } 3201 }
3202 void set_is_optimized(bool value) const; 3202 void set_is_optimized(bool value) const;
3203 bool is_alive() const { 3203 bool is_alive() const {
3204 return AliveBit::decode(raw_ptr()->state_bits_); 3204 return AliveBit::decode(raw_ptr()->state_bits_);
3205 } 3205 }
3206 void set_is_alive(bool value) const; 3206 void set_is_alive(bool value) const;
3207 bool has_used_cha() const {
3208 return UsedCHABit::decode(raw_ptr()->state_bits_);
3209 }
3210 void set_has_used_cha(bool value) const;
3207 3211
3208 uword EntryPoint() const { 3212 uword EntryPoint() const {
3209 const Instructions& instr = Instructions::Handle(instructions()); 3213 const Instructions& instr = Instructions::Handle(instructions());
3210 return instr.EntryPoint(); 3214 return instr.EntryPoint();
3211 } 3215 }
3212 intptr_t Size() const { 3216 intptr_t Size() const {
3213 const Instructions& instr = Instructions::Handle(instructions()); 3217 const Instructions& instr = Instructions::Handle(instructions());
3214 return instr.size(); 3218 return instr.size();
3215 } 3219 }
3216 RawArray* ObjectPool() const { 3220 RawArray* ObjectPool() const {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 // Returns an array indexed by deopt id, containing the extracted ICData. 3383 // Returns an array indexed by deopt id, containing the extracted ICData.
3380 RawArray* ExtractTypeFeedbackArray() const; 3384 RawArray* ExtractTypeFeedbackArray() const;
3381 3385
3382 private: 3386 private:
3383 void set_state_bits(intptr_t bits) const; 3387 void set_state_bits(intptr_t bits) const;
3384 3388
3385 friend class RawCode; 3389 friend class RawCode;
3386 enum { 3390 enum {
3387 kOptimizedBit = 0, 3391 kOptimizedBit = 0,
3388 kAliveBit = 1, 3392 kAliveBit = 1,
3393 kUsedCHABit = 2,
3389 }; 3394 };
3390 3395
3391 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {}; 3396 class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {};
3392 class AliveBit : public BitField<bool, kAliveBit, 1> {}; 3397 class AliveBit : public BitField<bool, kAliveBit, 1> {};
3398 class UsedCHABit : public BitField<bool, kUsedCHABit, 1> {};
3393 3399
3394 // An object finder visitor interface. 3400 // An object finder visitor interface.
3395 class FindRawCodeVisitor : public FindObjectVisitor { 3401 class FindRawCodeVisitor : public FindObjectVisitor {
3396 public: 3402 public:
3397 explicit FindRawCodeVisitor(uword pc) 3403 explicit FindRawCodeVisitor(uword pc)
3398 : FindObjectVisitor(Isolate::Current()), pc_(pc) { } 3404 : FindObjectVisitor(Isolate::Current()), pc_(pc) { }
3399 virtual ~FindRawCodeVisitor() { } 3405 virtual ~FindRawCodeVisitor() { }
3400 3406
3401 virtual uword filter_addr() const { return pc_; } 3407 virtual uword filter_addr() const { return pc_; }
3402 3408
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after
6628 6634
6629 6635
6630 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6636 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6631 intptr_t index) { 6637 intptr_t index) {
6632 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6638 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6633 } 6639 }
6634 6640
6635 } // namespace dart 6641 } // namespace dart
6636 6642
6637 #endif // VM_OBJECT_H_ 6643 #endif // VM_OBJECT_H_
OLDNEW
« runtime/vm/cha.cc ('K') | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698