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

Side by Side Diff: runtime/vm/code_patcher_x64.cc

Issue 9567023: Fix crash in inline cache: forgot to GC properly RawICData. Various cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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_patcher_ia32.cc ('k') | runtime/vm/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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 public: 109 public:
110 explicit InstanceCall(uword return_address) 110 explicit InstanceCall(uword return_address)
111 : DartCallPattern(return_address) {} 111 : DartCallPattern(return_address) {}
112 112
113 RawICData* ic_data() const { 113 RawICData* ic_data() const {
114 ICData& ic_data = ICData::Handle(); 114 ICData& ic_data = ICData::Handle();
115 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); 115 ic_data ^= reinterpret_cast<RawObject*>(immediate_one());
116 return ic_data.raw(); 116 return ic_data.raw();
117 } 117 }
118 118
119 void SetIcData(const ICData& value) {
120 set_immediate_one(reinterpret_cast<int64_t>(value.raw()));
121 }
122
123 private: 119 private:
124 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); 120 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall);
125 }; 121 };
126 122
127 123
128 void CodePatcher::GetStaticCallAt(uword return_address, 124 void CodePatcher::GetStaticCallAt(uword return_address,
129 Function* function, 125 Function* function,
130 uword* target) { 126 uword* target) {
131 ASSERT(function != NULL); 127 ASSERT(function != NULL);
132 ASSERT(target != NULL); 128 ASSERT(target != NULL);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 237 }
242 238
243 239
244 intptr_t CodePatcher::InstanceCallSizeInBytes() { 240 intptr_t CodePatcher::InstanceCallSizeInBytes() {
245 return DartCallPattern::kCallPatternSize; 241 return DartCallPattern::kCallPatternSize;
246 } 242 }
247 243
248 } // namespace dart 244 } // namespace dart
249 245
250 #endif // defined TARGET_ARCH_X64 246 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698