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

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

Issue 9567023: Fix crash in inline cache: forgot to GC properly RawICData. Various cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « runtime/vm/code_patcher_x64.cc ('k') | 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 3661 matching lines...) Expand 10 before | Expand all | Expand 10 after
3672 class ICData : public Instance { 3672 class ICData : public Instance {
3673 public: 3673 public:
3674 RawFunction* function() const { 3674 RawFunction* function() const {
3675 return raw_ptr()->function_; 3675 return raw_ptr()->function_;
3676 } 3676 }
3677 3677
3678 RawString* target_name() const { 3678 RawString* target_name() const {
3679 return raw_ptr()->target_name_; 3679 return raw_ptr()->target_name_;
3680 } 3680 }
3681 3681
3682 RawArray* ic_data() const {
3683 return raw_ptr()->ic_data_;
3684 }
3685
3686 intptr_t num_args_tested() const { 3682 intptr_t num_args_tested() const {
3687 return raw_ptr()->num_args_tested_; 3683 return raw_ptr()->num_args_tested_;
3688 } 3684 }
3689 3685
3690 intptr_t id() const { 3686 intptr_t id() const {
3691 return raw_ptr()->id_; 3687 return raw_ptr()->id_;
3692 } 3688 }
3693 3689
3694 intptr_t NumberOfChecks() const; 3690 intptr_t NumberOfChecks() const;
3695 3691
(...skipping 23 matching lines...) Expand all
3719 GrowableArray<const Class*>* classes, 3715 GrowableArray<const Class*>* classes,
3720 Function* target) const; 3716 Function* target) const;
3721 void GetOneClassCheckAt(int index, Class* cls, Function* target) const; 3717 void GetOneClassCheckAt(int index, Class* cls, Function* target) const;
3722 3718
3723 static RawICData* New(const Function& caller_function, 3719 static RawICData* New(const Function& caller_function,
3724 const String& target_name, 3720 const String& target_name,
3725 intptr_t id, 3721 intptr_t id,
3726 intptr_t num_args_tested); 3722 intptr_t num_args_tested);
3727 3723
3728 private: 3724 private:
3725 RawArray* ic_data() const {
3726 return raw_ptr()->ic_data_;
3727 }
3728
3729 void set_function(const Function& value) const; 3729 void set_function(const Function& value) const;
3730 void set_target_name(const String& value) const; 3730 void set_target_name(const String& value) const;
3731 void set_id(intptr_t value) const; 3731 void set_id(intptr_t value) const;
3732 void set_num_args_tested(intptr_t value) const; 3732 void set_num_args_tested(intptr_t value) const;
3733 void set_ic_data(const Array& value) const; 3733 void set_ic_data(const Array& value) const;
3734 3734
3735 intptr_t TestEntryLength() const; 3735 intptr_t TestEntryLength() const;
3736 3736
3737 HEAP_OBJECT_IMPLEMENTATION(ICData, Instance); 3737 HEAP_OBJECT_IMPLEMENTATION(ICData, Instance);
3738 friend class Class; 3738 friend class Class;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3806 } 3806 }
3807 3807
3808 3808
3809 void Context::SetAt(intptr_t index, const Instance& value) const { 3809 void Context::SetAt(intptr_t index, const Instance& value) const {
3810 StorePointer(InstanceAddr(index), value.raw()); 3810 StorePointer(InstanceAddr(index), value.raw());
3811 } 3811 }
3812 3812
3813 } // namespace dart 3813 } // namespace dart
3814 3814
3815 #endif // VM_OBJECT_H_ 3815 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698