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

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

Issue 1175523002: Object pool with support for untagged entries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/compiler.cc ('k') | runtime/vm/deopt_instructions.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/deferred_objects.h" 5 #include "vm/deferred_objects.h"
6 6
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 Function& function = Function::Handle(zone); 207 Function& function = Function::Handle(zone);
208 function ^= deopt_context->ObjectAt(index_); 208 function ^= deopt_context->ObjectAt(index_);
209 ASSERT(!function.IsNull()); 209 ASSERT(!function.IsNull());
210 const Error& error = Error::Handle(zone, 210 const Error& error = Error::Handle(zone,
211 Compiler::EnsureUnoptimizedCode(thread, function)); 211 Compiler::EnsureUnoptimizedCode(thread, function));
212 if (!error.IsNull()) { 212 if (!error.IsNull()) {
213 Exceptions::PropagateError(error); 213 Exceptions::PropagateError(error);
214 } 214 }
215 const Code& code = Code::Handle(zone, function.unoptimized_code()); 215 const Code& code = Code::Handle(zone, function.unoptimized_code());
216 ASSERT(!code.IsNull()); 216 ASSERT(!code.IsNull());
217 ASSERT(code.ObjectPool() != Object::null()); 217 ASSERT(code.GetObjectPool() != Object::null());
218 *slot() = code.ObjectPool(); 218 *slot() = code.GetObjectPool();
219 219
220 if (FLAG_trace_deoptimization_verbose) { 220 if (FLAG_trace_deoptimization_verbose) {
221 OS::PrintErr("materializing pp at 0x%" Px ": 0x%" Px "\n", 221 OS::PrintErr("materializing pp at 0x%" Px ": 0x%" Px "\n",
222 reinterpret_cast<uword>(slot()), 222 reinterpret_cast<uword>(slot()),
223 reinterpret_cast<uword>(code.ObjectPool())); 223 reinterpret_cast<uword>(code.GetObjectPool()));
224 } 224 }
225 } 225 }
226 226
227 227
228 RawObject* DeferredObject::object() { 228 RawObject* DeferredObject::object() {
229 if (object_ == NULL) { 229 if (object_ == NULL) {
230 Create(); 230 Create();
231 } 231 }
232 return object_->raw(); 232 return object_->raw();
233 } 233 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", 335 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n",
336 offset.Value(), 336 offset.Value(),
337 value.ToCString()); 337 value.ToCString());
338 } 338 }
339 } 339 }
340 } 340 }
341 } 341 }
342 } 342 }
343 343
344 } // namespace dart 344 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698