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 1055453006: Materialize booleans in the turbofan deoptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | src/deoptimizer.h » ('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 114190c3586fa58883e641b6cadbc33f3e965c3d..dd6565c17b58dba25cd3c7cedb9e48d065ee8ffa 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -528,10 +528,9 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
InstructionOperand* op,
MachineType type) {
if (op->IsStackSlot()) {
- // TODO(jarin) kMachBool and kRepBit should materialize true and false
- // rather than creating an int value.
- if (type == kMachBool || type == kRepBit || type == kMachInt32 ||
- type == kMachInt8 || type == kMachInt16) {
+ if (type == kMachBool || type == kRepBit) {
+ translation->StoreBoolStackSlot(StackSlotOperand::cast(op)->index());
+ } else if (type == kMachInt32 || type == kMachInt8 || type == kMachInt16) {
translation->StoreInt32StackSlot(StackSlotOperand::cast(op)->index());
} else if (type == kMachUint32 || type == kMachUint16 ||
type == kMachUint8) {
@@ -547,10 +546,9 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
DoubleStackSlotOperand::cast(op)->index());
} else if (op->IsRegister()) {
InstructionOperandConverter converter(this, instr);
- // TODO(jarin) kMachBool and kRepBit should materialize true and false
- // rather than creating an int value.
- if (type == kMachBool || type == kRepBit || type == kMachInt32 ||
- type == kMachInt8 || type == kMachInt16) {
+ if (type == kMachBool || type == kRepBit) {
+ translation->StoreBoolRegister(converter.ToRegister(op));
+ } else if (type == kMachInt32 || type == kMachInt8 || type == kMachInt16) {
translation->StoreInt32Register(converter.ToRegister(op));
} else if (type == kMachUint32 || type == kMachUint16 ||
type == kMachUint8) {
« no previous file with comments | « no previous file | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698