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

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

Issue 2953753002: Revert "Inline instance object hash code into object header on 64 bit." (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/become.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 RUNTIME_VM_BECOME_H_ 5 #ifndef RUNTIME_VM_BECOME_H_
6 #define RUNTIME_VM_BECOME_H_ 6 #define RUNTIME_VM_BECOME_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/raw_object.h" 9 #include "vm/raw_object.h"
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static const ClassId kClassId = kForwardingCorpse; 45 static const ClassId kClassId = kForwardingCorpse;
46 static bool IsInstance() { return true; } 46 static bool IsInstance() { return true; }
47 47
48 private: 48 private:
49 DISALLOW_ALLOCATION(); 49 DISALLOW_ALLOCATION();
50 DISALLOW_COPY_AND_ASSIGN(FakeInstance); 50 DISALLOW_COPY_AND_ASSIGN(FakeInstance);
51 }; 51 };
52 52
53 private: 53 private:
54 // This layout mirrors the layout of RawObject. 54 // This layout mirrors the layout of RawObject.
55 uint32_t tags_; 55 uword tags_;
56 #if defined(HASH_IN_OBJECT_HEADER)
57 uint32_t hash_;
58 #endif
59 RawObject* target_; 56 RawObject* target_;
60 57
61 // Returns the address of the embedded size. 58 // Returns the address of the embedded size.
62 intptr_t* SizeAddress() const { 59 intptr_t* SizeAddress() const {
63 uword addr = reinterpret_cast<uword>(&target_) + kWordSize; 60 uword addr = reinterpret_cast<uword>(&target_) + kWordSize;
64 return reinterpret_cast<intptr_t*>(addr); 61 return reinterpret_cast<intptr_t*>(addr);
65 } 62 }
66 63
67 // ForwardingCorpses cannot be allocated. Instead references to them are 64 // ForwardingCorpses cannot be allocated. Instead references to them are
68 // created using the AsForwarder factory method. 65 // created using the AsForwarder factory method.
(...skipping 16 matching lines...) Expand all
85 // (used for morphic instances during reload). 82 // (used for morphic instances during reload).
86 static void MakeDummyObject(const Instance& instance); 83 static void MakeDummyObject(const Instance& instance);
87 84
88 private: 85 private:
89 static void CrashDump(RawObject* before_obj, RawObject* after_obj); 86 static void CrashDump(RawObject* before_obj, RawObject* after_obj);
90 }; 87 };
91 88
92 } // namespace dart 89 } // namespace dart
93 90
94 #endif // RUNTIME_VM_BECOME_H_ 91 #endif // RUNTIME_VM_BECOME_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/become.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698