| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 // Smis: 0 -> false, all other -> true. | 1453 // Smis: 0 -> false, all other -> true. |
| 1454 __ test(reg, Operand(reg)); | 1454 __ test(reg, Operand(reg)); |
| 1455 __ j(equal, false_label); | 1455 __ j(equal, false_label); |
| 1456 __ JumpIfSmi(reg, true_label); | 1456 __ JumpIfSmi(reg, true_label); |
| 1457 } else if (expected.NeedsMap()) { | 1457 } else if (expected.NeedsMap()) { |
| 1458 // If we need a map later and have a Smi -> deopt. | 1458 // If we need a map later and have a Smi -> deopt. |
| 1459 __ test(reg, Immediate(kSmiTagMask)); | 1459 __ test(reg, Immediate(kSmiTagMask)); |
| 1460 DeoptimizeIf(zero, instr->environment()); | 1460 DeoptimizeIf(zero, instr->environment()); |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 Register map; | 1463 Register map = no_reg; |
| 1464 if (expected.NeedsMap()) { | 1464 if (expected.NeedsMap()) { |
| 1465 map = ToRegister(instr->TempAt(0)); | 1465 map = ToRegister(instr->TempAt(0)); |
| 1466 ASSERT(!map.is(reg)); | 1466 ASSERT(!map.is(reg)); |
| 1467 __ mov(map, FieldOperand(reg, HeapObject::kMapOffset)); | 1467 __ mov(map, FieldOperand(reg, HeapObject::kMapOffset)); |
| 1468 // Everything with a map could be undetectable, so check this now. | 1468 // Everything with a map could be undetectable, so check this now. |
| 1469 __ test_b(FieldOperand(map, Map::kBitFieldOffset), | 1469 __ test_b(FieldOperand(map, Map::kBitFieldOffset), |
| 1470 1 << Map::kIsUndetectable); | 1470 1 << Map::kIsUndetectable); |
| 1471 // Undetectable -> false. | 1471 // Undetectable -> false. |
| 1472 __ j(not_zero, false_label); | 1472 __ j(not_zero, false_label); |
| 1473 } | 1473 } |
| (...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4414 env->deoptimization_index()); | 4414 env->deoptimization_index()); |
| 4415 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4415 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4416 } | 4416 } |
| 4417 | 4417 |
| 4418 | 4418 |
| 4419 #undef __ | 4419 #undef __ |
| 4420 | 4420 |
| 4421 } } // namespace v8::internal | 4421 } } // namespace v8::internal |
| 4422 | 4422 |
| 4423 #endif // V8_TARGET_ARCH_IA32 | 4423 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |