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

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
« no previous file with comments | « runtime/vm/code_generator.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 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 intptr_t TestEntryLength() const; 2672 intptr_t TestEntryLength() const;
2673 2673
2674 HEAP_OBJECT_IMPLEMENTATION(ICData, Object); 2674 HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
2675 friend class Class; 2675 friend class Class;
2676 }; 2676 };
2677 2677
2678 2678
2679 class SubtypeTestCache : public Object { 2679 class SubtypeTestCache : public Object {
2680 public: 2680 public:
2681 enum Entries { 2681 enum Entries {
2682 kInstanceClass = 0, 2682 kInstanceClassId = 0,
2683 kInstanceTypeArguments = 1, 2683 kInstanceTypeArguments = 1,
2684 kInstantiatorTypeArguments = 2, 2684 kInstantiatorTypeArguments = 2,
2685 kTestResult = 3, 2685 kTestResult = 3,
2686 kTestEntryLength = 4, 2686 kTestEntryLength = 4,
2687 }; 2687 };
2688 2688
2689 intptr_t NumberOfChecks() const; 2689 intptr_t NumberOfChecks() const;
2690 void AddCheck(const Class& instance_class, 2690 void AddCheck(intptr_t class_id,
2691 const AbstractTypeArguments& instance_type_arguments, 2691 const AbstractTypeArguments& instance_type_arguments,
2692 const AbstractTypeArguments& instantiator_type_arguments, 2692 const AbstractTypeArguments& instantiator_type_arguments,
2693 const Bool& test_result) const; 2693 const Bool& test_result) const;
2694 void GetCheck(intptr_t ix, 2694 void GetCheck(intptr_t ix,
2695 Class* instance_class, 2695 intptr_t* class_id,
2696 AbstractTypeArguments* instance_type_arguments, 2696 AbstractTypeArguments* instance_type_arguments,
2697 AbstractTypeArguments* instantiator_type_arguments, 2697 AbstractTypeArguments* instantiator_type_arguments,
2698 Bool* test_result) const; 2698 Bool* test_result) const;
2699 2699
2700 static RawSubtypeTestCache* New(); 2700 static RawSubtypeTestCache* New();
2701 2701
2702 static intptr_t InstanceSize() { 2702 static intptr_t InstanceSize() {
2703 return RoundedAllocationSize(sizeof(RawSubtypeTestCache)); 2703 return RoundedAllocationSize(sizeof(RawSubtypeTestCache));
2704 } 2704 }
2705 2705
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after
5119 } 5119 }
5120 5120
5121 5121
5122 intptr_t Stackmap::SizeInBits() const { 5122 intptr_t Stackmap::SizeInBits() const {
5123 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 5123 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
5124 } 5124 }
5125 5125
5126 } // namespace dart 5126 } // namespace dart
5127 5127
5128 #endif // VM_OBJECT_H_ 5128 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698