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

Unified Diff: runtime/vm/object.cc

Issue 17723002: Remove skip_static_calls_ as it uses an obsolete way to check for uncalled static calls. Will be re… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« runtime/vm/code_patcher_x64.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 24431)
+++ runtime/vm/object.cc (working copy)
@@ -7311,17 +7311,18 @@
const char* PcDescriptors::KindAsStr(intptr_t index) const {
switch (DescriptorKind(index)) {
- case PcDescriptors::kDeopt: return "deopt ";
- case PcDescriptors::kEntryPatch: return "entry-patch ";
- case PcDescriptors::kPatchCode: return "patch ";
- case PcDescriptors::kLazyDeoptJump: return "lazy-deopt ";
- case PcDescriptors::kIcCall: return "ic-call ";
- case PcDescriptors::kFuncCall: return "fn-call ";
- case PcDescriptors::kClosureCall: return "closure-call ";
- case PcDescriptors::kReturn: return "return ";
- case PcDescriptors::kRuntimeCall: return "runtime-call ";
- case PcDescriptors::kOsrEntry: return "osr-entry ";
- case PcDescriptors::kOther: return "other ";
+ case PcDescriptors::kDeopt: return "deopt ";
+ case PcDescriptors::kEntryPatch: return "entry-patch ";
+ case PcDescriptors::kPatchCode: return "patch ";
+ case PcDescriptors::kLazyDeoptJump: return "lazy-deopt ";
+ case PcDescriptors::kIcCall: return "ic-call ";
+ case PcDescriptors::kOptStaticCall: return "opt-call ";
+ case PcDescriptors::kUnoptStaticCall: return "unopt-call ";
+ case PcDescriptors::kClosureCall: return "closure-call ";
+ case PcDescriptors::kReturn: return "return ";
+ case PcDescriptors::kRuntimeCall: return "runtime-call ";
+ case PcDescriptors::kOsrEntry: return "osr-entry ";
+ case PcDescriptors::kOther: return "other ";
}
UNREACHABLE();
return "";
@@ -8242,13 +8243,21 @@
ICData& ic_data_obj = ICData::Handle();
intptr_t max_id = -1;
for (intptr_t i = 0; i < descriptors.Length(); i++) {
- if (descriptors.DescriptorKind(i) == PcDescriptors::kIcCall) {
+ PcDescriptors::Kind kind = descriptors.DescriptorKind(i);
+ if ((kind == PcDescriptors::kIcCall) ||
+ (kind == PcDescriptors::kUnoptStaticCall)) {
intptr_t deopt_id = descriptors.DeoptId(i);
if (deopt_id > max_id) {
max_id = deopt_id;
}
node_ids->Add(deopt_id);
- CodePatcher::GetInstanceCallAt(descriptors.PC(i), *this, &ic_data_obj);
+ uword ret_addr = descriptors.PC(i);
+ if (kind == PcDescriptors::kIcCall) {
+ CodePatcher::GetInstanceCallAt(ret_addr, *this, &ic_data_obj);
+ } else {
+ ASSERT(kind == PcDescriptors::kUnoptStaticCall);
siva 2013/06/25 21:21:05 This assert seems superfluous considering there is
srdjan 2013/06/25 21:26:08 Removed
+ CodePatcher::GetUnoptimizedStaticCallAt(ret_addr, *this, &ic_data_obj);
+ }
ic_data_objs.Add(ic_data_obj);
}
}
@@ -8273,26 +8282,6 @@
}
-void Code::ExtractUncalledStaticCallDeoptIds(
- GrowableArray<intptr_t>* deopt_ids) const {
- ASSERT(!IsNull() && !is_optimized());
- ASSERT(deopt_ids != NULL);
- deopt_ids->Clear();
- const PcDescriptors& descriptors =
- PcDescriptors::Handle(this->pc_descriptors());
- for (intptr_t i = 0; i < descriptors.Length(); i++) {
- if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) {
- // Static call.
- const uword target_addr =
- CodePatcher::GetStaticCallTargetAt(descriptors.PC(i), *this);
- if (target_addr == StubCode::CallStaticFunctionEntryPoint()) {
- deopt_ids->Add(descriptors.DeoptId(i));
- }
- }
- }
-}
-
-
RawStackmap* Code::GetStackmap(uword pc, Array* maps, Stackmap* map) const {
// This code is used during iterating frames during a GC and hence it
// should not in turn start a GC.
« runtime/vm/code_patcher_x64.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698