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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2912903002: Reapply "Fix misoptimization of 'is' test"" (Closed)
Patch Set: Remove change to TestCidsInstr::Canonicalize and improve printer 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/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index fdcca2fa4ea8fbe13c630dba90970158b4411fbf..c4c8932832f053a386c95419ff56178635a8a4d5 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3104,21 +3104,19 @@ class TestSmiInstr : public TemplateComparison<2, NoThrow, Pure> {
// Checks the input value cid against cids stored in a table and returns either
-// a result or deoptimizes.
+// a result or deoptimizes. If the cid is not in the list and there is a deopt
+// id, then the instruction deoptimizes. If there is no deopt id, all the
+// results must be the same (all true or all false) and the instruction returns
+// the opposite for cids not on the list. The first element in the table must
+// always be the result for the Smi class-id and is allowed to differ from the
+// other results even in the no-deopt case.
class TestCidsInstr : public TemplateComparison<1, NoThrow, Pure> {
public:
TestCidsInstr(TokenPosition token_pos,
Token::Kind kind,
Value* value,
const ZoneGrowableArray<intptr_t>& cid_results,
- intptr_t deopt_id)
- : TemplateComparison(token_pos, kind, deopt_id),
- cid_results_(cid_results),
- licm_hoisted_(false) {
- ASSERT((kind == Token::kIS) || (kind == Token::kISNOT));
- SetInputAt(0, value);
- set_operation_cid(kObjectCid);
- }
+ intptr_t deopt_id);
const ZoneGrowableArray<intptr_t>& cid_results() const {
return cid_results_;
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698