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

Unified Diff: runtime/vm/code_descriptors.cc

Issue 10885039: Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/code_descriptors.cc
===================================================================
--- runtime/vm/code_descriptors.cc (revision 11533)
+++ runtime/vm/code_descriptors.cc (working copy)
@@ -4,6 +4,8 @@
#include "vm/code_descriptors.h"
+#include "vm/code_generator.h"
+
namespace dart {
void DescriptorList::AddDescriptor(PcDescriptors::Kind kind,
@@ -21,15 +23,17 @@
}
-void DescriptorList::AddDeoptInfo(intptr_t pc_offset,
- intptr_t deopt_id,
- intptr_t token_index,
- intptr_t deopt_array_index) {
+void DescriptorList::AddDeoptIndex(intptr_t pc_offset,
+ intptr_t deopt_id,
+ intptr_t deopt_reason,
+ intptr_t deopt_array_index) {
struct PcDesc data;
data.pc_offset = pc_offset;
data.kind = PcDescriptors::kDeoptIndex;
data.deopt_id = deopt_id;
- data.token_index = token_index;
+ // Token index is used for deopt reason.
+ ASSERT((kDeoptUnknown <= deopt_reason) && (deopt_reason < kDeoptNumReasons));
+ data.token_index = deopt_reason;
siva 2012/08/30 01:37:30 overloading token_index field as deopt_reason can
srdjan 2012/08/30 17:16:16 Done.
// Try_index is reused for deopt_array_index.
data.try_index = deopt_array_index;
list_.Add(data);

Powered by Google App Engine
This is Rietveld 408576698