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

Side by Side Diff: runtime/vm/code_patcher_ia32.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_generator.cc ('k') | runtime/vm/code_patcher_x64.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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 public: 127 public:
128 explicit InstanceCall(uword return_address) 128 explicit InstanceCall(uword return_address)
129 : DartCallPattern(return_address) {} 129 : DartCallPattern(return_address) {}
130 130
131 RawICData* ic_data() const { 131 RawICData* ic_data() const {
132 ICData& ic_data = ICData::Handle(); 132 ICData& ic_data = ICData::Handle();
133 ic_data ^= reinterpret_cast<RawObject*>(immediate_one()); 133 ic_data ^= reinterpret_cast<RawObject*>(immediate_one());
134 return ic_data.raw(); 134 return ic_data.raw();
135 } 135 }
136 136
137 void SetIcData(const ICData& value) {
138 set_immediate_one(reinterpret_cast<int32_t>(value.raw()));
139 }
140
141 private: 137 private:
142 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); 138 DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall);
143 }; 139 };
144 140
145 141
146 void CodePatcher::GetStaticCallAt(uword return_address, 142 void CodePatcher::GetStaticCallAt(uword return_address,
147 Function* function, 143 Function* function,
148 uword* target) { 144 uword* target) {
149 ASSERT(function != NULL); 145 ASSERT(function != NULL);
150 ASSERT(target != NULL); 146 ASSERT(target != NULL);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 255 }
260 256
261 257
262 intptr_t CodePatcher::InstanceCallSizeInBytes() { 258 intptr_t CodePatcher::InstanceCallSizeInBytes() {
263 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize; 259 return DartCallPattern::kNumInstructions * DartCallPattern::kInstructionSize;
264 } 260 }
265 261
266 } // namespace dart 262 } // namespace dart
267 263
268 #endif // defined TARGET_ARCH_IA32 264 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698