Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 3104027: Fix bug in 64 bit codegen causing us to always go slowcase in apply.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698