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

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

Issue 10521004: Eliminate RawObject::class_ field entirely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bool IsCanonical() const { 193 bool IsCanonical() const {
194 ASSERT(!IsNull()); 194 ASSERT(!IsNull());
195 return raw()->IsCanonical(); 195 return raw()->IsCanonical();
196 } 196 }
197 void SetCanonical() const { 197 void SetCanonical() const {
198 ASSERT(!IsNull()); 198 ASSERT(!IsNull());
199 raw()->SetCanonical(); 199 raw()->SetCanonical();
200 } 200 }
201 201
202 inline RawClass* clazz() const; 202 inline RawClass* clazz() const;
203 static intptr_t class_offset() { return OFFSET_OF(RawObject, class_); }
204 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } 203 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); }
205 204
206 // Class testers. 205 // Class testers.
207 #define DEFINE_CLASS_TESTER(clazz) \ 206 #define DEFINE_CLASS_TESTER(clazz) \
208 virtual bool Is##clazz() const { return false; } 207 virtual bool Is##clazz() const { return false; }
209 CLASS_LIST_NO_OBJECT(DEFINE_CLASS_TESTER); 208 CLASS_LIST_NO_OBJECT(DEFINE_CLASS_TESTER);
210 #undef DEFINE_CLASS_TESTER 209 #undef DEFINE_CLASS_TESTER
211 210
212 bool IsNull() const { return raw_ == null_; } 211 bool IsNull() const { return raw_ == null_; }
213 212
(...skipping 4745 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 } 4958 }
4960 4959
4961 4960
4962 intptr_t Stackmap::SizeInBits() const { 4961 intptr_t Stackmap::SizeInBits() const {
4963 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 4962 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
4964 } 4963 }
4965 4964
4966 } // namespace dart 4965 } // namespace dart
4967 4966
4968 #endif // VM_OBJECT_H_ 4967 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698