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

Unified Diff: runtime/vm/deferred_objects.cc

Issue 1107663002: Fix http://dartbug.com/23290 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deferred_objects.cc
===================================================================
--- runtime/vm/deferred_objects.cc (revision 45386)
+++ runtime/vm/deferred_objects.cc (working copy)
@@ -101,11 +101,16 @@
void DeferredRetAddr::Materialize(DeoptContext* deopt_context) {
- Function& function = Function::Handle(deopt_context->zone());
+ Thread* thread = deopt_context->thread();
+ Zone* zone = deopt_context->zone();
+ Function& function = Function::Handle(zone);
function ^= deopt_context->ObjectAt(index_);
- Compiler::EnsureUnoptimizedCode(deopt_context->thread(), function);
- const Code& code =
- Code::Handle(deopt_context->zone(), function.unoptimized_code());
+ const Error& error = Error::Handle(zone,
+ Compiler::EnsureUnoptimizedCode(thread, function));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+ const Code& code = Code::Handle(zone, function.unoptimized_code());
// Check that deopt_id exists.
// TODO(vegorov): verify after deoptimization targets as well.
#ifdef DEBUG
@@ -128,7 +133,7 @@
if (pc != 0) {
// If the deoptimization happened at an IC call, update the IC data
// to avoid repeated deoptimization at the same site next time around.
- ICData& ic_data = ICData::Handle();
+ ICData& ic_data = ICData::Handle(zone);
CodePatcher::GetInstanceCallAt(pc, code, &ic_data);
if (!ic_data.IsNull()) {
ic_data.AddDeoptReason(deopt_context->deopt_reason());
@@ -147,17 +152,22 @@
void DeferredPcMarker::Materialize(DeoptContext* deopt_context) {
+ Thread* thread = deopt_context->thread();
+ Zone* zone = deopt_context->zone();
uword* dest_addr = reinterpret_cast<uword*>(slot());
- Function& function = Function::Handle(deopt_context->zone());
+ Function& function = Function::Handle(zone);
function ^= deopt_context->ObjectAt(index_);
if (function.IsNull()) {
// Callee's PC marker is not used (pc of Deoptimize stub). Set to 0.
*dest_addr = 0;
return;
}
- Compiler::EnsureUnoptimizedCode(deopt_context->thread(), function);
- const Code& code =
- Code::Handle(deopt_context->zone(), function.unoptimized_code());
+ const Error& error = Error::Handle(zone,
+ Compiler::EnsureUnoptimizedCode(thread, function));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+ const Code& code = Code::Handle(zone, function.unoptimized_code());
ASSERT(!code.IsNull());
ASSERT(function.HasCode());
const intptr_t pc_marker =
@@ -188,12 +198,17 @@
void DeferredPp::Materialize(DeoptContext* deopt_context) {
- Function& function = Function::Handle(deopt_context->zone());
+ Thread* thread = deopt_context->thread();
+ Zone* zone = deopt_context->zone();
+ Function& function = Function::Handle(zone);
function ^= deopt_context->ObjectAt(index_);
ASSERT(!function.IsNull());
- Compiler::EnsureUnoptimizedCode(deopt_context->thread(), function);
- const Code& code =
- Code::Handle(deopt_context->zone(), function.unoptimized_code());
+ const Error& error = Error::Handle(zone,
+ Compiler::EnsureUnoptimizedCode(thread, function));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+ const Code& code = Code::Handle(zone, function.unoptimized_code());
ASSERT(!code.IsNull());
ASSERT(code.ObjectPool() != Object::null());
*slot() = code.ObjectPool();
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698