| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 6655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6666 Label no_info, switch_ready; | 6666 Label no_info, switch_ready; |
| 6667 // Get the elements kind and case on that. | 6667 // Get the elements kind and case on that. |
| 6668 __ Cmp(rbx, undefined_sentinel); | 6668 __ Cmp(rbx, undefined_sentinel); |
| 6669 __ j(equal, &no_info); | 6669 __ j(equal, &no_info); |
| 6670 __ movq(rdx, FieldOperand(rbx, Cell::kValueOffset)); | 6670 __ movq(rdx, FieldOperand(rbx, Cell::kValueOffset)); |
| 6671 | 6671 |
| 6672 // The type cell may have undefined in its value. | 6672 // The type cell may have undefined in its value. |
| 6673 __ Cmp(rdx, undefined_sentinel); | 6673 __ Cmp(rdx, undefined_sentinel); |
| 6674 __ j(equal, &no_info); | 6674 __ j(equal, &no_info); |
| 6675 | 6675 |
| 6676 // We should have an allocation site object | 6676 // The type cell has either an AllocationSite or a JSFunction |
| 6677 if (FLAG_debug_code) { | 6677 __ Cmp(FieldOperand(rdx, 0), |
| 6678 __ Cmp(FieldOperand(rdx, 0), | 6678 Handle<Map>(masm->isolate()->heap()->allocation_site_map())); |
| 6679 Handle<Map>(masm->isolate()->heap()->allocation_site_map())); | 6679 __ j(not_equal, &no_info); |
| 6680 __ Assert(equal, "Expected AllocationSite object in register rdx"); | |
| 6681 } | |
| 6682 | 6680 |
| 6683 __ movq(rdx, FieldOperand(rdx, AllocationSite::kPayloadOffset)); | 6681 __ movq(rdx, FieldOperand(rdx, AllocationSite::kPayloadOffset)); |
| 6684 __ SmiToInteger32(rdx, rdx); | 6682 __ SmiToInteger32(rdx, rdx); |
| 6685 __ jmp(&switch_ready); | 6683 __ jmp(&switch_ready); |
| 6686 __ bind(&no_info); | 6684 __ bind(&no_info); |
| 6687 __ movq(rdx, Immediate(GetInitialFastElementsKind())); | 6685 __ movq(rdx, Immediate(GetInitialFastElementsKind())); |
| 6688 __ bind(&switch_ready); | 6686 __ bind(&switch_ready); |
| 6689 | 6687 |
| 6690 if (argument_count_ == ANY) { | 6688 if (argument_count_ == ANY) { |
| 6691 Label not_zero_case, not_one_case; | 6689 Label not_zero_case, not_one_case; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6799 __ bind(&fast_elements_case); | 6797 __ bind(&fast_elements_case); |
| 6800 GenerateCase(masm, FAST_ELEMENTS); | 6798 GenerateCase(masm, FAST_ELEMENTS); |
| 6801 } | 6799 } |
| 6802 | 6800 |
| 6803 | 6801 |
| 6804 #undef __ | 6802 #undef __ |
| 6805 | 6803 |
| 6806 } } // namespace v8::internal | 6804 } } // namespace v8::internal |
| 6807 | 6805 |
| 6808 #endif // V8_TARGET_ARCH_X64 | 6806 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |