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

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

Issue 10695136: Use class id instead of class in subtype test cache. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 intptr_t TestEntryLength() const; 2642 intptr_t TestEntryLength() const;
2643 2643
2644 HEAP_OBJECT_IMPLEMENTATION(ICData, Object); 2644 HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
2645 friend class Class; 2645 friend class Class;
2646 }; 2646 };
2647 2647
2648 2648
2649 class SubtypeTestCache : public Object { 2649 class SubtypeTestCache : public Object {
2650 public: 2650 public:
2651 enum Entries { 2651 enum Entries {
2652 kInstanceClass = 0, 2652 kInstanceClassId = 0,
2653 kInstanceTypeArguments = 1, 2653 kInstanceTypeArguments = 1,
2654 kInstantiatorTypeArguments = 2, 2654 kInstantiatorTypeArguments = 2,
2655 kTestResult = 3, 2655 kTestResult = 3,
2656 kTestEntryLength = 4, 2656 kTestEntryLength = 4,
2657 }; 2657 };
2658 2658
2659 intptr_t NumberOfChecks() const; 2659 intptr_t NumberOfChecks() const;
2660 void AddCheck(const Class& instance_class, 2660 void AddCheck(intptr_t class_id,
2661 const AbstractTypeArguments& instance_type_arguments, 2661 const AbstractTypeArguments& instance_type_arguments,
2662 const AbstractTypeArguments& instantiator_type_arguments, 2662 const AbstractTypeArguments& instantiator_type_arguments,
2663 const Bool& test_result) const; 2663 const Bool& test_result) const;
2664 void GetCheck(intptr_t ix, 2664 void GetCheck(intptr_t ix,
2665 Class* instance_class, 2665 intptr_t* class_id,
2666 AbstractTypeArguments* instance_type_arguments, 2666 AbstractTypeArguments* instance_type_arguments,
2667 AbstractTypeArguments* instantiator_type_arguments, 2667 AbstractTypeArguments* instantiator_type_arguments,
2668 Bool* test_result) const; 2668 Bool* test_result) const;
2669 2669
2670 static RawSubtypeTestCache* New(); 2670 static RawSubtypeTestCache* New();
2671 2671
2672 static intptr_t InstanceSize() { 2672 static intptr_t InstanceSize() {
2673 return RoundedAllocationSize(sizeof(RawSubtypeTestCache)); 2673 return RoundedAllocationSize(sizeof(RawSubtypeTestCache));
2674 } 2674 }
2675 2675
(...skipping 2417 matching lines...) Expand 10 before | Expand all | Expand 10 after
5093 } 5093 }
5094 5094
5095 5095
5096 intptr_t Stackmap::SizeInBits() const { 5096 intptr_t Stackmap::SizeInBits() const {
5097 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 5097 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
5098 } 5098 }
5099 5099
5100 } // namespace dart 5100 } // namespace dart
5101 5101
5102 #endif // VM_OBJECT_H_ 5102 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/stub_code_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698