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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 void Cmp(const Operand& dst, Handle<Object> source); | 782 void Cmp(const Operand& dst, Handle<Object> source); |
783 void Cmp(Register dst, Smi* src); | 783 void Cmp(Register dst, Smi* src); |
784 void Cmp(const Operand& dst, Smi* src); | 784 void Cmp(const Operand& dst, Smi* src); |
785 void Push(Handle<Object> source); | 785 void Push(Handle<Object> source); |
786 | 786 |
787 // Load a heap object and handle the case of new-space objects by | 787 // Load a heap object and handle the case of new-space objects by |
788 // indirecting via a global cell. | 788 // indirecting via a global cell. |
789 void LoadHeapObject(Register result, Handle<HeapObject> object); | 789 void LoadHeapObject(Register result, Handle<HeapObject> object); |
790 void PushHeapObject(Handle<HeapObject> object); | 790 void PushHeapObject(Handle<HeapObject> object); |
791 | 791 |
| 792 void LoadObject(Register result, Handle<Object> object) { |
| 793 if (object->IsHeapObject()) { |
| 794 LoadHeapObject(result, Handle<HeapObject>::cast(object)); |
| 795 } else { |
| 796 Move(result, object); |
| 797 } |
| 798 } |
| 799 |
792 // Load a global cell into a register. | 800 // Load a global cell into a register. |
793 void LoadGlobalCell(Register dst, Handle<JSGlobalPropertyCell> cell); | 801 void LoadGlobalCell(Register dst, Handle<JSGlobalPropertyCell> cell); |
794 | 802 |
795 // Emit code to discard a non-negative number of pointer-sized elements | 803 // Emit code to discard a non-negative number of pointer-sized elements |
796 // from the stack, clobbering only the rsp register. | 804 // from the stack, clobbering only the rsp register. |
797 void Drop(int stack_elements); | 805 void Drop(int stack_elements); |
798 | 806 |
799 void Call(Label* target) { call(target); } | 807 void Call(Label* target) { call(target); } |
800 | 808 |
801 // Control Flow | 809 // Control Flow |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 masm->popfd(); \ | 1436 masm->popfd(); \ |
1429 } \ | 1437 } \ |
1430 masm-> | 1438 masm-> |
1431 #else | 1439 #else |
1432 #define ACCESS_MASM(masm) masm-> | 1440 #define ACCESS_MASM(masm) masm-> |
1433 #endif | 1441 #endif |
1434 | 1442 |
1435 } } // namespace v8::internal | 1443 } } // namespace v8::internal |
1436 | 1444 |
1437 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1445 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |