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

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

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ARM working, x64 cleanup Created 5 years, 3 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return; 167 return;
168 } 168 }
169 const Error& error = Error::Handle(zone, 169 const Error& error = Error::Handle(zone,
170 Compiler::EnsureUnoptimizedCode(thread, function)); 170 Compiler::EnsureUnoptimizedCode(thread, function));
171 if (!error.IsNull()) { 171 if (!error.IsNull()) {
172 Exceptions::PropagateError(error); 172 Exceptions::PropagateError(error);
173 } 173 }
174 const Code& code = Code::Handle(zone, function.unoptimized_code()); 174 const Code& code = Code::Handle(zone, function.unoptimized_code());
175 ASSERT(!code.IsNull()); 175 ASSERT(!code.IsNull());
176 ASSERT(function.HasCode()); 176 ASSERT(function.HasCode());
177 const intptr_t pc_marker = 177 *reinterpret_cast<RawObject**>(dest_addr) = code.raw();
178 code.EntryPoint() + Assembler::EntryPointToPcMarkerOffset();
179 *dest_addr = pc_marker;
180 178
181 if (FLAG_trace_deoptimization_verbose) { 179 if (FLAG_trace_deoptimization_verbose) {
182 OS::PrintErr("materializing pc marker at 0x%" Px ": %s, %s\n", 180 OS::PrintErr("materializing pc marker at 0x%" Px ": %s, %s\n",
183 reinterpret_cast<uword>(slot()), code.ToCString(), 181 reinterpret_cast<uword>(slot()), code.ToCString(),
184 function.ToCString()); 182 function.ToCString());
185 } 183 }
186 184
187 // Increment the deoptimization counter. This effectively increments each 185 // Increment the deoptimization counter. This effectively increments each
188 // function occurring in the optimized frame. 186 // function occurring in the optimized frame.
189 function.set_deoptimization_counter(function.deoptimization_counter() + 1); 187 function.set_deoptimization_counter(function.deoptimization_counter() + 1);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", 333 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n",
336 offset.Value(), 334 offset.Value(),
337 value.ToCString()); 335 value.ToCString());
338 } 336 }
339 } 337 }
340 } 338 }
341 } 339 }
342 } 340 }
343 341
344 } // namespace dart 342 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698