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

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

Issue 1291543003: Revert "VM: Materialize stub pc-markers (smi 0) eagerly on deoptimization." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | runtime/vm/deopt_instructions.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) 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 } 155 }
156 156
157 157
158 void DeferredPcMarker::Materialize(DeoptContext* deopt_context) { 158 void DeferredPcMarker::Materialize(DeoptContext* deopt_context) {
159 Thread* thread = deopt_context->thread(); 159 Thread* thread = deopt_context->thread();
160 Zone* zone = deopt_context->zone(); 160 Zone* zone = deopt_context->zone();
161 uword* dest_addr = reinterpret_cast<uword*>(slot()); 161 uword* dest_addr = reinterpret_cast<uword*>(slot());
162 Function& function = Function::Handle(zone); 162 Function& function = Function::Handle(zone);
163 function ^= deopt_context->ObjectAt(index_); 163 function ^= deopt_context->ObjectAt(index_);
164 // Null case is already handled in DeoptPcMarkerInstr::Execute. 164 if (function.IsNull()) {
165 ASSERT(!function.IsNull()); 165 // Callee's PC marker is not used (pc of Deoptimize stub). Set to 0.
166 *dest_addr = 0;
167 return;
168 }
166 const Error& error = Error::Handle(zone, 169 const Error& error = Error::Handle(zone,
167 Compiler::EnsureUnoptimizedCode(thread, function)); 170 Compiler::EnsureUnoptimizedCode(thread, function));
168 if (!error.IsNull()) { 171 if (!error.IsNull()) {
169 Exceptions::PropagateError(error); 172 Exceptions::PropagateError(error);
170 } 173 }
171 const Code& code = Code::Handle(zone, function.unoptimized_code()); 174 const Code& code = Code::Handle(zone, function.unoptimized_code());
172 ASSERT(!code.IsNull()); 175 ASSERT(!code.IsNull());
173 ASSERT(function.HasCode()); 176 ASSERT(function.HasCode());
174 const intptr_t pc_marker = 177 const intptr_t pc_marker =
175 code.EntryPoint() + Assembler::EntryPointToPcMarkerOffset(); 178 code.EntryPoint() + Assembler::EntryPointToPcMarkerOffset();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", 335 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n",
333 offset.Value(), 336 offset.Value(),
334 value.ToCString()); 337 value.ToCString());
335 } 338 }
336 } 339 }
337 } 340 }
338 } 341 }
339 } 342 }
340 343
341 } // namespace dart 344 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698