| 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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 __ JumpIfSmi(object, &false_result); | 1904 __ JumpIfSmi(object, &false_result); |
| 1905 | 1905 |
| 1906 // This is the inlined call site instanceof cache. The two occurences of the | 1906 // This is the inlined call site instanceof cache. The two occurences of the |
| 1907 // hole value will be patched to the last map/result pair generated by the | 1907 // hole value will be patched to the last map/result pair generated by the |
| 1908 // instanceof stub. | 1908 // instanceof stub. |
| 1909 NearLabel cache_miss; | 1909 NearLabel cache_miss; |
| 1910 // Use a temp register to avoid memory operands with variable lengths. | 1910 // Use a temp register to avoid memory operands with variable lengths. |
| 1911 Register map = ToRegister(instr->TempAt(0)); | 1911 Register map = ToRegister(instr->TempAt(0)); |
| 1912 __ movq(map, FieldOperand(object, HeapObject::kMapOffset)); | 1912 __ movq(map, FieldOperand(object, HeapObject::kMapOffset)); |
| 1913 __ bind(deferred->map_check()); // Label for calculating code patching. | 1913 __ bind(deferred->map_check()); // Label for calculating code patching. |
| 1914 __ Move(kScratchRegister, factory()->the_hole_value()); | 1914 __ movq(kScratchRegister, factory()->the_hole_value(), |
| 1915 RelocInfo::EMBEDDED_OBJECT); |
| 1915 __ cmpq(map, kScratchRegister); // Patched to cached map. | 1916 __ cmpq(map, kScratchRegister); // Patched to cached map. |
| 1916 __ j(not_equal, &cache_miss); | 1917 __ j(not_equal, &cache_miss); |
| 1917 // Patched to load either true or false. | 1918 // Patched to load either true or false. |
| 1918 __ LoadRoot(ToRegister(instr->result()), Heap::kTheHoleValueRootIndex); | 1919 __ LoadRoot(ToRegister(instr->result()), Heap::kTheHoleValueRootIndex); |
| 1919 #ifdef DEBUG | 1920 #ifdef DEBUG |
| 1920 // Check that the code size between patch label and patch sites is invariant. | 1921 // Check that the code size between patch label and patch sites is invariant. |
| 1921 Label end_of_patched_code; | 1922 Label end_of_patched_code; |
| 1922 __ bind(&end_of_patched_code); | 1923 __ bind(&end_of_patched_code); |
| 1923 ASSERT(true); | 1924 ASSERT(true); |
| 1924 #endif | 1925 #endif |
| (...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3823 RegisterEnvironmentForDeoptimization(environment); | 3824 RegisterEnvironmentForDeoptimization(environment); |
| 3824 ASSERT(osr_pc_offset_ == -1); | 3825 ASSERT(osr_pc_offset_ == -1); |
| 3825 osr_pc_offset_ = masm()->pc_offset(); | 3826 osr_pc_offset_ = masm()->pc_offset(); |
| 3826 } | 3827 } |
| 3827 | 3828 |
| 3828 #undef __ | 3829 #undef __ |
| 3829 | 3830 |
| 3830 } } // namespace v8::internal | 3831 } } // namespace v8::internal |
| 3831 | 3832 |
| 3832 #endif // V8_TARGET_ARCH_X64 | 3833 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |