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

Unified Diff: src/compiler/representation-change.cc

Issue 2568053002: [turbofan] Fix representation change from bit to tagged pointer. (Closed)
Patch Set: Fix test Created 4 years 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 | « no previous file | test/mjsunit/compiler/regress-673244.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.cc
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc
index 93566da6cab237a312b34e0b8235f029cf7135ad..6e1341321cf2dc81ce51879b7be943810ae5000f 100644
--- a/src/compiler/representation-change.cc
+++ b/src/compiler/representation-change.cc
@@ -307,7 +307,12 @@ Node* RepresentationChanger::GetTaggedPointerRepresentationFor(
// We just provide a dummy value here.
return jsgraph()->TheHoleConstant();
} else if (output_rep == MachineRepresentation::kBit) {
- return node;
+ if (output_type->Is(Type::Boolean())) {
+ op = simplified()->ChangeBitToTagged();
+ } else {
+ return TypeError(node, output_rep, output_type,
+ MachineRepresentation::kTagged);
+ }
} else if (IsWord(output_rep)) {
if (output_type->Is(Type::Unsigned32())) {
// uint32 -> float64 -> tagged
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-673244.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698