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

Unified Diff: src/compiler/code-generator.cc

Issue 2646463002: [turbofan] Fix translation of uint32 deopt immediates. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | test/mjsunit/regress/regress-crbug-681983.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 78634768714229a002a17d4e1cabfaf5e9de4447..bf30ec9ab19498f1f59ef16f1f488e965761a0b1 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -928,9 +928,13 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
type.representation() == MachineRepresentation::kNone);
DCHECK(type.representation() != MachineRepresentation::kNone ||
constant.ToInt32() == FrameStateDescriptor::kImpossibleValue);
-
- constant_object =
- isolate()->factory()->NewNumberFromInt(constant.ToInt32());
+ if (type == MachineType::Uint32()) {
+ constant_object =
+ isolate()->factory()->NewNumberFromUint(constant.ToInt32());
+ } else {
+ constant_object =
+ isolate()->factory()->NewNumberFromInt(constant.ToInt32());
+ }
}
break;
case Constant::kInt64:
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-681983.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698