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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 2751543003: VM: Simplify lowering of is-tests. (Closed)
Patch Set: fix dbc build Created 3 years, 9 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_mips.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index fc44e42addfe8a39128cfd3d1c1c68801d0d214d..e7b7db1bb2b01f043bd7b929081d3cbc79c681c4 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -556,7 +556,6 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof(
void FlowGraphCompiler::GenerateInstanceOf(TokenPosition token_pos,
intptr_t deopt_id,
const AbstractType& type,
- bool negate_result,
LocationSummary* locs) {
ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
ASSERT(!type.IsObjectType() && !type.IsDynamicType());
@@ -597,23 +596,15 @@ void FlowGraphCompiler::GenerateInstanceOf(TokenPosition token_pos,
// 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(4);
- if (negate_result) {
- __ popq(RDX);
- __ LoadObject(RAX, Bool::True());
- __ cmpq(RDX, RAX);
- __ j(NOT_EQUAL, &done, Assembler::kNearJump);
- __ LoadObject(RAX, Bool::False());
- } else {
- __ popq(RAX);
- }
+ __ popq(RAX);
__ jmp(&done, Assembler::kNearJump);
}
__ Bind(&is_not_instance);
- __ LoadObject(RAX, Bool::Get(negate_result));
+ __ LoadObject(RAX, Bool::Get(false));
__ jmp(&done, Assembler::kNearJump);
__ Bind(&is_instance);
- __ LoadObject(RAX, Bool::Get(!negate_result));
+ __ LoadObject(RAX, Bool::Get(true));
__ Bind(&done);
__ popq(RDX); // Remove pushed instantiator type arguments.
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698