| 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:
|
|
|