| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 | 2612 |
| 2613 // Check that applicand.apply is Function.prototype.apply. | 2613 // Check that applicand.apply is Function.prototype.apply. |
| 2614 __ movq(rax, Operand(rsp, kPointerSize)); | 2614 __ movq(rax, Operand(rsp, kPointerSize)); |
| 2615 is_smi = masm_->CheckSmi(rax); | 2615 is_smi = masm_->CheckSmi(rax); |
| 2616 __ j(is_smi, &build_args); | 2616 __ j(is_smi, &build_args); |
| 2617 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rcx); | 2617 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rcx); |
| 2618 __ j(not_equal, &build_args); | 2618 __ j(not_equal, &build_args); |
| 2619 __ movq(rcx, FieldOperand(rax, JSFunction::kCodeEntryOffset)); | 2619 __ movq(rcx, FieldOperand(rax, JSFunction::kCodeEntryOffset)); |
| 2620 __ subq(rcx, Immediate(Code::kHeaderSize - kHeapObjectTag)); | 2620 __ subq(rcx, Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 2621 Handle<Code> apply_code(Builtins::builtin(Builtins::FunctionApply)); | 2621 Handle<Code> apply_code(Builtins::builtin(Builtins::FunctionApply)); |
| 2622 __ Cmp(FieldOperand(rcx, SharedFunctionInfo::kCodeOffset), apply_code); | 2622 __ Cmp(rcx, apply_code); |
| 2623 __ j(not_equal, &build_args); | 2623 __ j(not_equal, &build_args); |
| 2624 | 2624 |
| 2625 // Check that applicand is a function. | 2625 // Check that applicand is a function. |
| 2626 __ movq(rdi, Operand(rsp, 2 * kPointerSize)); | 2626 __ movq(rdi, Operand(rsp, 2 * kPointerSize)); |
| 2627 is_smi = masm_->CheckSmi(rdi); | 2627 is_smi = masm_->CheckSmi(rdi); |
| 2628 __ j(is_smi, &build_args); | 2628 __ j(is_smi, &build_args); |
| 2629 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); | 2629 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); |
| 2630 __ j(not_equal, &build_args); | 2630 __ j(not_equal, &build_args); |
| 2631 | 2631 |
| 2632 // Copy the arguments to this function possibly from the | 2632 // Copy the arguments to this function possibly from the |
| (...skipping 10219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12852 #undef __ | 12852 #undef __ |
| 12853 | 12853 |
| 12854 void RecordWriteStub::Generate(MacroAssembler* masm) { | 12854 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 12855 masm->RecordWriteHelper(object_, addr_, scratch_); | 12855 masm->RecordWriteHelper(object_, addr_, scratch_); |
| 12856 masm->ret(0); | 12856 masm->ret(0); |
| 12857 } | 12857 } |
| 12858 | 12858 |
| 12859 } } // namespace v8::internal | 12859 } } // namespace v8::internal |
| 12860 | 12860 |
| 12861 #endif // V8_TARGET_ARCH_X64 | 12861 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |