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

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

Issue 1255003004: Implement patch records to patch canonical objects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review Created 5 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 raw()->SetCreatedFromSnapshot(); 267 raw()->SetCreatedFromSnapshot();
268 } 268 }
269 bool IsCanonical() const { 269 bool IsCanonical() const {
270 ASSERT(!IsNull()); 270 ASSERT(!IsNull());
271 return raw()->IsCanonical(); 271 return raw()->IsCanonical();
272 } 272 }
273 void SetCanonical() const { 273 void SetCanonical() const {
274 ASSERT(!IsNull()); 274 ASSERT(!IsNull());
275 raw()->SetCanonical(); 275 raw()->SetCanonical();
276 } 276 }
277 void ClearCanonical() const {
278 ASSERT(!IsNull());
279 raw()->ClearCanonical();
280 }
277 intptr_t GetClassId() const { 281 intptr_t GetClassId() const {
278 return !raw()->IsHeapObject() ? 282 return !raw()->IsHeapObject() ?
279 static_cast<intptr_t>(kSmiCid) : raw()->GetClassId(); 283 static_cast<intptr_t>(kSmiCid) : raw()->GetClassId();
280 } 284 }
281 inline RawClass* clazz() const; 285 inline RawClass* clazz() const;
282 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } 286 static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); }
283 287
284 // Class testers. 288 // Class testers.
285 #define DEFINE_CLASS_TESTER(clazz) \ 289 #define DEFINE_CLASS_TESTER(clazz) \
286 virtual bool Is##clazz() const { return false; } 290 virtual bool Is##clazz() const { return false; }
(...skipping 7724 matching lines...) Expand 10 before | Expand all | Expand 10 after
8011 8015
8012 8016
8013 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8017 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8014 intptr_t index) { 8018 intptr_t index) {
8015 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8019 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8016 } 8020 }
8017 8021
8018 } // namespace dart 8022 } // namespace dart
8019 8023
8020 #endif // VM_OBJECT_H_ 8024 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698