| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 | 171 |
| 172 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { | 172 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
| 173 bool resolved; | 173 bool resolved; |
| 174 Handle<Code> code = ResolveBuiltin(id, &resolved); | 174 Handle<Code> code = ResolveBuiltin(id, &resolved); |
| 175 | 175 |
| 176 const char* name = Builtins::GetName(id); | 176 const char* name = Builtins::GetName(id); |
| 177 int argc = Builtins::GetArgumentsCount(id); | 177 int argc = Builtins::GetArgumentsCount(id); |
| 178 | 178 |
| 179 movq(target, code, RelocInfo::EXTERNAL_REFERENCE); // Is external reference? | 179 movq(target, code, RelocInfo::EMBEDDED_OBJECT); |
| 180 if (!resolved) { | 180 if (!resolved) { |
| 181 uint32_t flags = | 181 uint32_t flags = |
| 182 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | | 182 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | |
| 183 Bootstrapper::FixupFlagsIsPCRelative::encode(false) | | 183 Bootstrapper::FixupFlagsIsPCRelative::encode(false) | |
| 184 Bootstrapper::FixupFlagsUseCodeObject::encode(true); | 184 Bootstrapper::FixupFlagsUseCodeObject::encode(true); |
| 185 Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name }; | 185 Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name }; |
| 186 unresolved_.Add(entry); | 186 unresolved_.Add(entry); |
| 187 } | 187 } |
| 188 addq(target, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 188 addq(target, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 189 } | 189 } |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 InvokeCode(Handle<Code>(code), expected, expected, | 617 InvokeCode(Handle<Code>(code), expected, expected, |
| 618 RelocInfo::CODE_TARGET, flag); | 618 RelocInfo::CODE_TARGET, flag); |
| 619 | 619 |
| 620 const char* name = Builtins::GetName(id); | 620 const char* name = Builtins::GetName(id); |
| 621 int argc = Builtins::GetArgumentsCount(id); | 621 int argc = Builtins::GetArgumentsCount(id); |
| 622 // The target address for the jump is stored as an immediate at offset | 622 // The target address for the jump is stored as an immediate at offset |
| 623 // kInvokeCodeAddressOffset. | 623 // kInvokeCodeAddressOffset. |
| 624 if (!resolved) { | 624 if (!resolved) { |
| 625 uint32_t flags = | 625 uint32_t flags = |
| 626 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | | 626 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | |
| 627 Bootstrapper::FixupFlagsIsPCRelative::encode(true) | | 627 Bootstrapper::FixupFlagsIsPCRelative::encode(false) | |
| 628 Bootstrapper::FixupFlagsUseCodeObject::encode(false); | 628 Bootstrapper::FixupFlagsUseCodeObject::encode(false); |
| 629 Unresolved entry = | 629 Unresolved entry = |
| 630 { pc_offset() - kTargetAddrToReturnAddrDist, flags, name }; | 630 { pc_offset() - kTargetAddrToReturnAddrDist, flags, name }; |
| 631 unresolved_.Add(entry); | 631 unresolved_.Add(entry); |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 | 634 |
| 635 | 635 |
| 636 void MacroAssembler::InvokePrologue(const ParameterCount& expected, | 636 void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
| 637 const ParameterCount& actual, | 637 const ParameterCount& actual, |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 push(rcx); | 876 push(rcx); |
| 877 | 877 |
| 878 // Clear the top frame. | 878 // Clear the top frame. |
| 879 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); | 879 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); |
| 880 movq(kScratchRegister, c_entry_fp_address); | 880 movq(kScratchRegister, c_entry_fp_address); |
| 881 movq(Operand(kScratchRegister, 0), Immediate(0)); | 881 movq(Operand(kScratchRegister, 0), Immediate(0)); |
| 882 } | 882 } |
| 883 | 883 |
| 884 | 884 |
| 885 } } // namespace v8::internal | 885 } } // namespace v8::internal |
| OLD | NEW |