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

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

Issue 1015423002: [turbofan] Remember types for deoptimization during simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 5 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 | « no previous file | src/compiler/common-operator.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 e88eafd3eb099ed9e74f23192eab10d5322ab9f7..7e5da3c19330b75bd358930aa821303c625ceebe 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -509,8 +509,10 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
InstructionOperand* op,
MachineType type) {
if (op->IsStackSlot()) {
- if (type == kMachBool || type == kMachInt32 || type == kMachInt8 ||
- type == kMachInt16) {
+ // 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) {
translation->StoreInt32StackSlot(op->index());
} else if (type == kMachUint32 || type == kMachUint16 ||
type == kMachUint8) {
@@ -525,8 +527,10 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
translation->StoreDoubleStackSlot(op->index());
} else if (op->IsRegister()) {
InstructionOperandConverter converter(this, instr);
- if (type == kMachBool || type == kMachInt32 || type == kMachInt8 ||
- type == kMachInt16) {
+ // 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) {
translation->StoreInt32Register(converter.ToRegister(op));
} else if (type == kMachUint32 || type == kMachUint16 ||
type == kMachUint8) {
@@ -546,12 +550,14 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
Handle<Object> constant_object;
switch (constant.type()) {
case Constant::kInt32:
- DCHECK(type == kMachInt32 || type == kMachUint32);
+ DCHECK(type == kMachInt32 || type == kMachUint32 || type == kRepBit);
constant_object =
isolate()->factory()->NewNumberFromInt(constant.ToInt32());
break;
case Constant::kFloat64:
- DCHECK(type == kMachFloat64 || type == kMachAnyTagged);
+ DCHECK(type == kMachFloat64 || type == kMachAnyTagged ||
+ type == kRepTagged || type == (kTypeInt32 | kRepTagged) ||
+ type == (kTypeUint32 | kRepTagged));
constant_object = isolate()->factory()->NewNumber(constant.ToFloat64());
break;
case Constant::kHeapObject:
« no previous file with comments | « no previous file | src/compiler/common-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698