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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 12049039: Fix source position for stack traces with optimized top function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebase Created 7 years, 11 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/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 17754)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -459,6 +459,7 @@
// Returns:
// - true or false in EAX.
void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
+ intptr_t deopt_id,
const AbstractType& type,
bool negate_result,
LocationSummary* locs) {
@@ -501,7 +502,7 @@
__ pushl(EDX); // Instantiator type arguments.
__ LoadObject(EAX, test_cache);
__ pushl(EAX);
- GenerateCallRuntime(token_pos, kInstanceofRuntimeEntry, locs);
+ GenerateCallRuntime(token_pos, deopt_id, kInstanceofRuntimeEntry, locs);
// Pop the parameters supplied to the runtime entry. The result of the
// instanceof runtime call will be left as the result of the operation.
__ Drop(5);
@@ -541,6 +542,7 @@
// Performance notes: positive checks must be quick, negative checks can be slow
// as they throw an exception.
void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
+ intptr_t deopt_id,
const AbstractType& dst_type,
const String& dst_name,
LocationSummary* locs) {
@@ -569,6 +571,7 @@
__ PushObject(dst_name); // Push the name of the destination.
__ PushObject(error_message);
GenerateCallRuntime(token_pos,
+ deopt_id,
kMalformedTypeErrorRuntimeEntry,
locs);
// We should never return here.
@@ -596,7 +599,7 @@
__ PushObject(dst_name); // Push the name of the destination.
__ LoadObject(EAX, test_cache);
__ pushl(EAX);
- GenerateCallRuntime(token_pos, kTypeCheckRuntimeEntry, locs);
+ GenerateCallRuntime(token_pos, deopt_id, kTypeCheckRuntimeEntry, locs);
// Pop the parameters supplied to the runtime entry. The result of the
// type check runtime call is the checked value.
__ Drop(6);
@@ -1091,11 +1094,25 @@
void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos,
+ intptr_t deopt_id,
const RuntimeEntry& entry,
LocationSummary* locs) {
__ CallRuntime(entry);
- AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
+ AddCurrentDescriptor(PcDescriptors::kOther, deopt_id, token_pos);
RecordSafepoint(locs);
+ if (deopt_id != Isolate::kNoDeoptId) {
+ // Marks either the continuation point in unoptimized code or the
+ // deoptimization point in optimized code, after call.
+ if (is_optimizing()) {
+ AddDeoptIndexAtCall(deopt_id, token_pos);
+ } else {
+ // Add deoptimization continuation point after the call and before the
+ // arguments are removed.
+ AddCurrentDescriptor(PcDescriptors::kDeoptAfter,
+ deopt_id,
+ token_pos);
+ }
+ }
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698