| 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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 | 1211 |
| 1212 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { | 1212 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { |
| 1213 Register result = ToRegister(instr->result()); | 1213 Register result = ToRegister(instr->result()); |
| 1214 Register array = ToRegister(instr->InputAt(0)); | 1214 Register array = ToRegister(instr->InputAt(0)); |
| 1215 __ movq(result, FieldOperand(array, JSArray::kLengthOffset)); | 1215 __ movq(result, FieldOperand(array, JSArray::kLengthOffset)); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 | 1218 |
| 1219 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1219 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
| 1220 Register result = ToRegister(instr->result()); | 1220 Register result = ToRegister(instr->result()); |
| 1221 Register array = ToRegister(instr->InputAt(0)); | 1221 Register array = ToRegister(instr->InputAt(0)); |
| 1222 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1222 __ movq(result, FieldOperand(array, FixedArrayBase::kLengthOffset)); |
| 1223 } | |
| 1224 | |
| 1225 | |
| 1226 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { | |
| 1227 Register result = ToRegister(instr->result()); | |
| 1228 Register array = ToRegister(instr->InputAt(0)); | |
| 1229 __ movl(result, FieldOperand(array, ExternalPixelArray::kLengthOffset)); | |
| 1230 } | 1223 } |
| 1231 | 1224 |
| 1232 | 1225 |
| 1233 void LCodeGen::DoElementsKind(LElementsKind* instr) { | 1226 void LCodeGen::DoElementsKind(LElementsKind* instr) { |
| 1234 Register result = ToRegister(instr->result()); | 1227 Register result = ToRegister(instr->result()); |
| 1235 Register input = ToRegister(instr->InputAt(0)); | 1228 Register input = ToRegister(instr->InputAt(0)); |
| 1236 | 1229 |
| 1237 // Load map into |result|. | 1230 // Load map into |result|. |
| 1238 __ movq(result, FieldOperand(input, HeapObject::kMapOffset)); | 1231 __ movq(result, FieldOperand(input, HeapObject::kMapOffset)); |
| 1239 // Load the map's "bit field 2" into |result|. We only need the first byte. | 1232 // Load the map's "bit field 2" into |result|. We only need the first byte. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 Label* false_label = chunk_->GetAssemblyLabel(false_block); | 1396 Label* false_label = chunk_->GetAssemblyLabel(false_block); |
| 1404 | 1397 |
| 1405 ToBooleanStub::Types expected = instr->hydrogen()->expected_input_types(); | 1398 ToBooleanStub::Types expected = instr->hydrogen()->expected_input_types(); |
| 1406 // Avoid deopts in the case where we've never executed this path before. | 1399 // Avoid deopts in the case where we've never executed this path before. |
| 1407 if (expected.IsEmpty()) expected = ToBooleanStub::all_types(); | 1400 if (expected.IsEmpty()) expected = ToBooleanStub::all_types(); |
| 1408 | 1401 |
| 1409 if (expected.Contains(ToBooleanStub::UNDEFINED)) { | 1402 if (expected.Contains(ToBooleanStub::UNDEFINED)) { |
| 1410 // undefined -> false. | 1403 // undefined -> false. |
| 1411 __ CompareRoot(reg, Heap::kUndefinedValueRootIndex); | 1404 __ CompareRoot(reg, Heap::kUndefinedValueRootIndex); |
| 1412 __ j(equal, false_label); | 1405 __ j(equal, false_label); |
| 1413 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1414 // We've seen undefined for the first time -> deopt. | |
| 1415 __ CompareRoot(reg, Heap::kUndefinedValueRootIndex); | |
| 1416 DeoptimizeIf(equal, instr->environment()); | |
| 1417 } | 1406 } |
| 1418 | |
| 1419 if (expected.Contains(ToBooleanStub::BOOLEAN)) { | 1407 if (expected.Contains(ToBooleanStub::BOOLEAN)) { |
| 1420 // true -> true. | 1408 // true -> true. |
| 1421 __ CompareRoot(reg, Heap::kTrueValueRootIndex); | 1409 __ CompareRoot(reg, Heap::kTrueValueRootIndex); |
| 1422 __ j(equal, true_label); | 1410 __ j(equal, true_label); |
| 1423 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1424 // We've seen a boolean for the first time -> deopt. | |
| 1425 __ CompareRoot(reg, Heap::kTrueValueRootIndex); | |
| 1426 DeoptimizeIf(equal, instr->environment()); | |
| 1427 } | |
| 1428 | |
| 1429 if (expected.Contains(ToBooleanStub::BOOLEAN)) { | |
| 1430 // false -> false. | 1411 // false -> false. |
| 1431 __ CompareRoot(reg, Heap::kFalseValueRootIndex); | 1412 __ CompareRoot(reg, Heap::kFalseValueRootIndex); |
| 1432 __ j(equal, false_label); | 1413 __ j(equal, false_label); |
| 1433 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1434 // We've seen a boolean for the first time -> deopt. | |
| 1435 __ CompareRoot(reg, Heap::kFalseValueRootIndex); | |
| 1436 DeoptimizeIf(equal, instr->environment()); | |
| 1437 } | 1414 } |
| 1438 | |
| 1439 if (expected.Contains(ToBooleanStub::NULL_TYPE)) { | 1415 if (expected.Contains(ToBooleanStub::NULL_TYPE)) { |
| 1440 // 'null' -> false. | 1416 // 'null' -> false. |
| 1441 __ CompareRoot(reg, Heap::kNullValueRootIndex); | 1417 __ CompareRoot(reg, Heap::kNullValueRootIndex); |
| 1442 __ j(equal, false_label); | 1418 __ j(equal, false_label); |
| 1443 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1444 // We've seen null for the first time -> deopt. | |
| 1445 __ CompareRoot(reg, Heap::kNullValueRootIndex); | |
| 1446 DeoptimizeIf(equal, instr->environment()); | |
| 1447 } | 1419 } |
| 1448 | 1420 |
| 1449 if (expected.Contains(ToBooleanStub::SMI)) { | 1421 if (expected.Contains(ToBooleanStub::SMI)) { |
| 1450 // Smis: 0 -> false, all other -> true. | 1422 // Smis: 0 -> false, all other -> true. |
| 1451 __ Cmp(reg, Smi::FromInt(0)); | 1423 __ Cmp(reg, Smi::FromInt(0)); |
| 1452 __ j(equal, false_label); | 1424 __ j(equal, false_label); |
| 1453 __ JumpIfSmi(reg, true_label); | 1425 __ JumpIfSmi(reg, true_label); |
| 1454 } else if (expected.NeedsMap()) { | 1426 } else if (expected.NeedsMap()) { |
| 1455 // If we need a map later and have a Smi -> deopt. | 1427 // If we need a map later and have a Smi -> deopt. |
| 1456 __ testb(reg, Immediate(kSmiTagMask)); | 1428 __ testb(reg, Immediate(kSmiTagMask)); |
| 1457 DeoptimizeIf(zero, instr->environment()); | 1429 DeoptimizeIf(zero, instr->environment()); |
| 1458 } | 1430 } |
| 1459 | 1431 |
| 1460 const Register map = kScratchRegister; | 1432 const Register map = kScratchRegister; |
| 1461 if (expected.NeedsMap()) { | 1433 if (expected.NeedsMap()) { |
| 1462 __ movq(map, FieldOperand(reg, HeapObject::kMapOffset)); | 1434 __ movq(map, FieldOperand(reg, HeapObject::kMapOffset)); |
| 1463 // Everything with a map could be undetectable, so check this now. | 1435 |
| 1464 __ testb(FieldOperand(map, Map::kBitFieldOffset), | 1436 if (expected.CanBeUndetectable()) { |
| 1465 Immediate(1 << Map::kIsUndetectable)); | 1437 // Undetectable -> false. |
| 1466 // Undetectable -> false. | 1438 __ testb(FieldOperand(map, Map::kBitFieldOffset), |
| 1467 __ j(not_zero, false_label); | 1439 Immediate(1 << Map::kIsUndetectable)); |
| 1440 __ j(not_zero, false_label); |
| 1441 } |
| 1468 } | 1442 } |
| 1469 | 1443 |
| 1470 if (expected.Contains(ToBooleanStub::SPEC_OBJECT)) { | 1444 if (expected.Contains(ToBooleanStub::SPEC_OBJECT)) { |
| 1471 // spec object -> true. | 1445 // spec object -> true. |
| 1472 __ CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); | 1446 __ CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); |
| 1473 __ j(above_equal, true_label); | 1447 __ j(above_equal, true_label); |
| 1474 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1475 // We've seen a spec object for the first time -> deopt. | |
| 1476 __ CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); | |
| 1477 DeoptimizeIf(above_equal, instr->environment()); | |
| 1478 } | 1448 } |
| 1479 | 1449 |
| 1480 if (expected.Contains(ToBooleanStub::STRING)) { | 1450 if (expected.Contains(ToBooleanStub::STRING)) { |
| 1481 // String value -> false iff empty. | 1451 // String value -> false iff empty. |
| 1482 Label not_string; | 1452 Label not_string; |
| 1483 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); | 1453 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); |
| 1484 __ j(above_equal, ¬_string, Label::kNear); | 1454 __ j(above_equal, ¬_string, Label::kNear); |
| 1485 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0)); | 1455 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0)); |
| 1486 __ j(not_zero, true_label); | 1456 __ j(not_zero, true_label); |
| 1487 __ jmp(false_label); | 1457 __ jmp(false_label); |
| 1488 __ bind(¬_string); | 1458 __ bind(¬_string); |
| 1489 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1490 // We've seen a string for the first time -> deopt | |
| 1491 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); | |
| 1492 DeoptimizeIf(below, instr->environment()); | |
| 1493 } | 1459 } |
| 1494 | 1460 |
| 1495 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1461 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
| 1496 // heap number -> false iff +0, -0, or NaN. | 1462 // heap number -> false iff +0, -0, or NaN. |
| 1497 Label not_heap_number; | 1463 Label not_heap_number; |
| 1498 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); | 1464 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); |
| 1499 __ j(not_equal, ¬_heap_number, Label::kNear); | 1465 __ j(not_equal, ¬_heap_number, Label::kNear); |
| 1500 __ xorps(xmm0, xmm0); | 1466 __ xorps(xmm0, xmm0); |
| 1501 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); | 1467 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); |
| 1502 __ j(zero, false_label); | 1468 __ j(zero, false_label); |
| 1503 __ jmp(true_label); | 1469 __ jmp(true_label); |
| 1504 __ bind(¬_heap_number); | 1470 __ bind(¬_heap_number); |
| 1505 } else if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | |
| 1506 // We've seen a heap number for the first time -> deopt. | |
| 1507 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); | |
| 1508 DeoptimizeIf(equal, instr->environment()); | |
| 1509 } | 1471 } |
| 1510 | 1472 |
| 1511 if (expected.Contains(ToBooleanStub::INTERNAL_OBJECT)) { | 1473 // We've seen something for the first time -> deopt. |
| 1512 // internal objects -> true | 1474 DeoptimizeIf(no_condition, instr->environment()); |
| 1513 __ jmp(true_label); | |
| 1514 } else { | |
| 1515 // We've seen something for the first time -> deopt. | |
| 1516 DeoptimizeIf(no_condition, instr->environment()); | |
| 1517 } | |
| 1518 } | 1475 } |
| 1519 } | 1476 } |
| 1520 } | 1477 } |
| 1521 | 1478 |
| 1522 | 1479 |
| 1523 void LCodeGen::EmitGoto(int block) { | 1480 void LCodeGen::EmitGoto(int block) { |
| 1524 block = chunk_->LookupDestination(block); | 1481 block = chunk_->LookupDestination(block); |
| 1525 int next_block = GetNextEmittedBlock(current_block_); | 1482 int next_block = GetNextEmittedBlock(current_block_); |
| 1526 if (block != next_block) { | 1483 if (block != next_block) { |
| 1527 __ jmp(chunk_->GetAssemblyLabel(block)); | 1484 __ jmp(chunk_->GetAssemblyLabel(block)); |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 __ Integer32ToSmi(input_reg, input_reg); | 2709 __ Integer32ToSmi(input_reg, input_reg); |
| 2753 __ bind(deferred->exit()); | 2710 __ bind(deferred->exit()); |
| 2754 } | 2711 } |
| 2755 } | 2712 } |
| 2756 | 2713 |
| 2757 | 2714 |
| 2758 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { | 2715 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { |
| 2759 XMMRegister xmm_scratch = xmm0; | 2716 XMMRegister xmm_scratch = xmm0; |
| 2760 Register output_reg = ToRegister(instr->result()); | 2717 Register output_reg = ToRegister(instr->result()); |
| 2761 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); | 2718 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
| 2719 Label done; |
| 2762 | 2720 |
| 2763 if (CpuFeatures::IsSupported(SSE4_1)) { | 2721 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 2764 CpuFeatures::Scope scope(SSE4_1); | 2722 CpuFeatures::Scope scope(SSE4_1); |
| 2765 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 2723 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 2766 // Deoptimize if minus zero. | 2724 // Deoptimize if minus zero. |
| 2767 __ movq(output_reg, input_reg); | 2725 __ movq(output_reg, input_reg); |
| 2768 __ subq(output_reg, Immediate(1)); | 2726 __ subq(output_reg, Immediate(1)); |
| 2769 DeoptimizeIf(overflow, instr->environment()); | 2727 DeoptimizeIf(overflow, instr->environment()); |
| 2770 } | 2728 } |
| 2771 __ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown); | 2729 __ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown); |
| 2772 __ cvttsd2si(output_reg, xmm_scratch); | 2730 __ cvttsd2si(output_reg, xmm_scratch); |
| 2773 __ cmpl(output_reg, Immediate(0x80000000)); | 2731 __ cmpl(output_reg, Immediate(0x80000000)); |
| 2774 DeoptimizeIf(equal, instr->environment()); | 2732 DeoptimizeIf(equal, instr->environment()); |
| 2775 } else { | 2733 } else { |
| 2734 // Deoptimize on negative inputs. |
| 2776 __ xorps(xmm_scratch, xmm_scratch); // Zero the register. | 2735 __ xorps(xmm_scratch, xmm_scratch); // Zero the register. |
| 2777 __ ucomisd(input_reg, xmm_scratch); | 2736 __ ucomisd(input_reg, xmm_scratch); |
| 2778 | 2737 DeoptimizeIf(below, instr->environment()); |
| 2779 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 2738 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| 2780 DeoptimizeIf(below_equal, instr->environment()); | 2739 // Check for negative zero. |
| 2781 } else { | 2740 Label positive_sign; |
| 2782 DeoptimizeIf(below, instr->environment()); | 2741 __ j(above, &positive_sign, Label::kNear); |
| 2742 __ movmskpd(output_reg, input_reg); |
| 2743 __ testq(output_reg, Immediate(1)); |
| 2744 DeoptimizeIf(not_zero, instr->environment()); |
| 2745 __ Set(output_reg, 0); |
| 2746 __ jmp(&done); |
| 2747 __ bind(&positive_sign); |
| 2783 } | 2748 } |
| 2784 | 2749 |
| 2785 // Use truncating instruction (OK because input is positive). | 2750 // Use truncating instruction (OK because input is positive). |
| 2786 __ cvttsd2si(output_reg, input_reg); | 2751 __ cvttsd2si(output_reg, input_reg); |
| 2787 | 2752 |
| 2788 // Overflow is signalled with minint. | 2753 // Overflow is signalled with minint. |
| 2789 __ cmpl(output_reg, Immediate(0x80000000)); | 2754 __ cmpl(output_reg, Immediate(0x80000000)); |
| 2790 DeoptimizeIf(equal, instr->environment()); | 2755 DeoptimizeIf(equal, instr->environment()); |
| 2791 } | 2756 } |
| 2757 __ bind(&done); |
| 2792 } | 2758 } |
| 2793 | 2759 |
| 2794 | 2760 |
| 2795 void LCodeGen::DoMathRound(LUnaryMathOperation* instr) { | 2761 void LCodeGen::DoMathRound(LUnaryMathOperation* instr) { |
| 2796 const XMMRegister xmm_scratch = xmm0; | 2762 const XMMRegister xmm_scratch = xmm0; |
| 2797 Register output_reg = ToRegister(instr->result()); | 2763 Register output_reg = ToRegister(instr->result()); |
| 2798 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); | 2764 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
| 2799 | 2765 |
| 2800 Label done; | 2766 Label done; |
| 2801 // xmm_scratch = 0.5 | 2767 // xmm_scratch = 0.5 |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4001 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 3967 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
| 4002 Immediate(1 << Map::kIsUndetectable)); | 3968 Immediate(1 << Map::kIsUndetectable)); |
| 4003 final_branch_condition = zero; | 3969 final_branch_condition = zero; |
| 4004 | 3970 |
| 4005 } else if (type_name->Equals(heap()->boolean_symbol())) { | 3971 } else if (type_name->Equals(heap()->boolean_symbol())) { |
| 4006 __ CompareRoot(input, Heap::kTrueValueRootIndex); | 3972 __ CompareRoot(input, Heap::kTrueValueRootIndex); |
| 4007 __ j(equal, true_label); | 3973 __ j(equal, true_label); |
| 4008 __ CompareRoot(input, Heap::kFalseValueRootIndex); | 3974 __ CompareRoot(input, Heap::kFalseValueRootIndex); |
| 4009 final_branch_condition = equal; | 3975 final_branch_condition = equal; |
| 4010 | 3976 |
| 3977 } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_symbol())) { |
| 3978 __ CompareRoot(input, Heap::kNullValueRootIndex); |
| 3979 final_branch_condition = equal; |
| 3980 |
| 4011 } else if (type_name->Equals(heap()->undefined_symbol())) { | 3981 } else if (type_name->Equals(heap()->undefined_symbol())) { |
| 4012 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); | 3982 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); |
| 4013 __ j(equal, true_label); | 3983 __ j(equal, true_label); |
| 4014 __ JumpIfSmi(input, false_label); | 3984 __ JumpIfSmi(input, false_label); |
| 4015 // Check for undetectable objects => true. | 3985 // Check for undetectable objects => true. |
| 4016 __ movq(input, FieldOperand(input, HeapObject::kMapOffset)); | 3986 __ movq(input, FieldOperand(input, HeapObject::kMapOffset)); |
| 4017 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 3987 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
| 4018 Immediate(1 << Map::kIsUndetectable)); | 3988 Immediate(1 << Map::kIsUndetectable)); |
| 4019 final_branch_condition = not_zero; | 3989 final_branch_condition = not_zero; |
| 4020 | 3990 |
| 4021 } else if (type_name->Equals(heap()->function_symbol())) { | 3991 } else if (type_name->Equals(heap()->function_symbol())) { |
| 4022 __ JumpIfSmi(input, false_label); | 3992 __ JumpIfSmi(input, false_label); |
| 4023 __ CmpObjectType(input, FIRST_CALLABLE_SPEC_OBJECT_TYPE, input); | 3993 __ CmpObjectType(input, FIRST_CALLABLE_SPEC_OBJECT_TYPE, input); |
| 4024 final_branch_condition = above_equal; | 3994 final_branch_condition = above_equal; |
| 4025 | 3995 |
| 4026 } else if (type_name->Equals(heap()->object_symbol())) { | 3996 } else if (type_name->Equals(heap()->object_symbol())) { |
| 4027 __ JumpIfSmi(input, false_label); | 3997 __ JumpIfSmi(input, false_label); |
| 4028 __ CompareRoot(input, Heap::kNullValueRootIndex); | 3998 if (!FLAG_harmony_typeof) { |
| 4029 __ j(equal, true_label); | 3999 __ CompareRoot(input, Heap::kNullValueRootIndex); |
| 4000 __ j(equal, true_label); |
| 4001 } |
| 4030 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); | 4002 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); |
| 4031 __ j(below, false_label); | 4003 __ j(below, false_label); |
| 4032 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4004 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
| 4033 __ j(above, false_label); | 4005 __ j(above, false_label); |
| 4034 // Check for undetectable objects => false. | 4006 // Check for undetectable objects => false. |
| 4035 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 4007 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
| 4036 Immediate(1 << Map::kIsUndetectable)); | 4008 Immediate(1 << Map::kIsUndetectable)); |
| 4037 final_branch_condition = zero; | 4009 final_branch_condition = zero; |
| 4038 | 4010 |
| 4039 } else { | 4011 } else { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4184 RegisterEnvironmentForDeoptimization(environment); | 4156 RegisterEnvironmentForDeoptimization(environment); |
| 4185 ASSERT(osr_pc_offset_ == -1); | 4157 ASSERT(osr_pc_offset_ == -1); |
| 4186 osr_pc_offset_ = masm()->pc_offset(); | 4158 osr_pc_offset_ = masm()->pc_offset(); |
| 4187 } | 4159 } |
| 4188 | 4160 |
| 4189 #undef __ | 4161 #undef __ |
| 4190 | 4162 |
| 4191 } } // namespace v8::internal | 4163 } } // namespace v8::internal |
| 4192 | 4164 |
| 4193 #endif // V8_TARGET_ARCH_X64 | 4165 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |