| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4334 } | 4334 } |
| 4335 return; | 4335 return; |
| 4336 } | 4336 } |
| 4337 | 4337 |
| 4338 Register object = ToRegister(instr->object()); | 4338 Register object = ToRegister(instr->object()); |
| 4339 Handle<Map> transition = instr->transition(); | 4339 Handle<Map> transition = instr->transition(); |
| 4340 SmiCheck check_needed = | 4340 SmiCheck check_needed = |
| 4341 instr->hydrogen()->value()->IsHeapObject() | 4341 instr->hydrogen()->value()->IsHeapObject() |
| 4342 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 4342 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
| 4343 | 4343 |
| 4344 if (representation.IsSmi()) { | 4344 ASSERT(!(representation.IsSmi() && |
| 4345 if (instr->value()->IsConstantOperand()) { | 4345 instr->value()->IsConstantOperand() && |
| 4346 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4346 !IsSmi(LConstantOperand::cast(instr->value())))); |
| 4347 if (!IsSmi(operand_value)) { | 4347 if (representation.IsHeapObject()) { |
| 4348 DeoptimizeIf(no_condition, instr->environment()); | |
| 4349 } | |
| 4350 } | |
| 4351 } else if (representation.IsHeapObject()) { | |
| 4352 if (instr->value()->IsConstantOperand()) { | 4348 if (instr->value()->IsConstantOperand()) { |
| 4353 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4349 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4354 if (IsInteger32(operand_value)) { | 4350 if (IsInteger32(operand_value)) { |
| 4355 DeoptimizeIf(no_condition, instr->environment()); | 4351 DeoptimizeIf(no_condition, instr->environment()); |
| 4356 } | 4352 } |
| 4357 } else { | 4353 } else { |
| 4358 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4354 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 4359 Register value = ToRegister(instr->value()); | 4355 Register value = ToRegister(instr->value()); |
| 4360 __ test(value, Immediate(kSmiTagMask)); | 4356 __ test(value, Immediate(kSmiTagMask)); |
| 4361 DeoptimizeIf(zero, instr->environment()); | 4357 DeoptimizeIf(zero, instr->environment()); |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6352 FixedArray::kHeaderSize - kPointerSize)); | 6348 FixedArray::kHeaderSize - kPointerSize)); |
| 6353 __ bind(&done); | 6349 __ bind(&done); |
| 6354 } | 6350 } |
| 6355 | 6351 |
| 6356 | 6352 |
| 6357 #undef __ | 6353 #undef __ |
| 6358 | 6354 |
| 6359 } } // namespace v8::internal | 6355 } } // namespace v8::internal |
| 6360 | 6356 |
| 6361 #endif // V8_TARGET_ARCH_IA32 | 6357 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |