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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2877713003: Eliminated with_checks variable (Closed)
Patch Set: Removed TODO Created 3 years, 7 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/intermediate_language.cc ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_dbc.cc
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index 3838de2cbf23169b146711bf97fbfdd8a6d999b3..10ff36d7d365b4fd0878e46cd433b415d59759a1 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -245,44 +245,38 @@ EMIT_NATIVE_CODE(PolymorphicInstanceCall,
const CallTargets& ic_data = targets();
// Push the target onto the stack.
- if (with_checks()) {
- const intptr_t length = ic_data.length();
- if (!Utils::IsUint(8, length)) {
- Unsupported(compiler);
- UNREACHABLE();
- }
- bool using_ranges = false;
- for (intptr_t i = 0; i < length; i++) {
- if (ic_data[i].cid_start != ic_data[i].cid_end) {
- using_ranges = true;
- break;
- }
+ const intptr_t length = ic_data.length();
+ if (!Utils::IsUint(8, length)) {
+ Unsupported(compiler);
+ UNREACHABLE();
+ }
+ bool using_ranges = false;
+ for (intptr_t i = 0; i < length; i++) {
+ if (ic_data[i].cid_start != ic_data[i].cid_end) {
+ using_ranges = true;
+ break;
}
+ }
- if (using_ranges) {
- __ PushPolymorphicInstanceCallByRange(instance_call()->ArgumentCount(),
- length);
- } else {
- __ PushPolymorphicInstanceCall(instance_call()->ArgumentCount(), length);
- }
- for (intptr_t i = 0; i < length; i++) {
- const Function& target = *ic_data[i].target;
- intptr_t cid_start = ic_data[i].cid_start;
- intptr_t cid_end = ic_data[i].cid_end;
+ if (using_ranges) {
+ __ PushPolymorphicInstanceCallByRange(instance_call()->ArgumentCount(),
+ length);
+ } else {
+ __ PushPolymorphicInstanceCall(instance_call()->ArgumentCount(), length);
+ }
+ for (intptr_t i = 0; i < length; i++) {
+ const Function& target = *ic_data[i].target;
+ intptr_t cid_start = ic_data[i].cid_start;
+ intptr_t cid_end = ic_data[i].cid_end;
- __ Nop(compiler->ToEmbeddableCid(cid_start, this));
- if (using_ranges) {
- __ Nop(compiler->ToEmbeddableCid(1 + cid_end - cid_start, this));
- }
- __ Nop(__ AddConstant(target));
+ __ Nop(compiler->ToEmbeddableCid(cid_start, this));
+ if (using_ranges) {
+ __ Nop(compiler->ToEmbeddableCid(1 + cid_end - cid_start, this));
}
- compiler->EmitDeopt(deopt_id(),
- ICData::kDeoptPolymorphicInstanceCallTestFail, 0);
- } else {
- ASSERT(targets().HasSingleTarget());
- const Function& target = targets().FirstTarget();
- __ PushConstant(target);
+ __ Nop(__ AddConstant(target));
}
+ compiler->EmitDeopt(deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail,
+ 0);
// Call the function.
__ StaticCall(instance_call()->ArgumentCount(), argdesc_kidx);
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698