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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 // Smis: 0 -> false, all other -> true. | 1452 // Smis: 0 -> false, all other -> true. |
1453 __ test(reg, Operand(reg)); | 1453 __ test(reg, Operand(reg)); |
1454 __ j(equal, false_label); | 1454 __ j(equal, false_label); |
1455 __ JumpIfSmi(reg, true_label); | 1455 __ JumpIfSmi(reg, true_label); |
1456 } else if (expected.NeedsMap()) { | 1456 } else if (expected.NeedsMap()) { |
1457 // If we need a map later and have a Smi -> deopt. | 1457 // If we need a map later and have a Smi -> deopt. |
1458 __ test(reg, Immediate(kSmiTagMask)); | 1458 __ test(reg, Immediate(kSmiTagMask)); |
1459 DeoptimizeIf(zero, instr->environment()); | 1459 DeoptimizeIf(zero, instr->environment()); |
1460 } | 1460 } |
1461 | 1461 |
1462 Register map; | 1462 Register map = no_reg; |
1463 if (expected.NeedsMap()) { | 1463 if (expected.NeedsMap()) { |
1464 map = ToRegister(instr->TempAt(0)); | 1464 map = ToRegister(instr->TempAt(0)); |
1465 ASSERT(!map.is(reg)); | 1465 ASSERT(!map.is(reg)); |
1466 __ mov(map, FieldOperand(reg, HeapObject::kMapOffset)); | 1466 __ mov(map, FieldOperand(reg, HeapObject::kMapOffset)); |
1467 // Everything with a map could be undetectable, so check this now. | 1467 // Everything with a map could be undetectable, so check this now. |
1468 __ test_b(FieldOperand(map, Map::kBitFieldOffset), | 1468 __ test_b(FieldOperand(map, Map::kBitFieldOffset), |
1469 1 << Map::kIsUndetectable); | 1469 1 << Map::kIsUndetectable); |
1470 // Undetectable -> false. | 1470 // Undetectable -> false. |
1471 __ j(not_zero, false_label); | 1471 __ j(not_zero, false_label); |
1472 } | 1472 } |
(...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4399 env->deoptimization_index()); | 4399 env->deoptimization_index()); |
4400 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4400 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4401 } | 4401 } |
4402 | 4402 |
4403 | 4403 |
4404 #undef __ | 4404 #undef __ |
4405 | 4405 |
4406 } } // namespace v8::internal | 4406 } } // namespace v8::internal |
4407 | 4407 |
4408 #endif // V8_TARGET_ARCH_IA32 | 4408 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |