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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 9297019: Fix and adapt debugger for new call target caches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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
OLDNEW
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 3680 matching lines...) Expand 10 before | Expand all | Expand 10 after
3691 __ Set(rax, argc_); 3691 __ Set(rax, argc_);
3692 __ Set(rbx, 0); 3692 __ Set(rbx, 0);
3693 __ SetCallKind(rcx, CALL_AS_METHOD); 3693 __ SetCallKind(rcx, CALL_AS_METHOD);
3694 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); 3694 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
3695 Handle<Code> adaptor = 3695 Handle<Code> adaptor =
3696 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline(); 3696 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline();
3697 __ Jump(adaptor, RelocInfo::CODE_TARGET); 3697 __ Jump(adaptor, RelocInfo::CODE_TARGET);
3698 } 3698 }
3699 3699
3700 3700
3701 void CallFunctionStub::FinishCode(Handle<Code> code) {
3702 code->set_has_function_cache(RecordCallTarget());
3703 }
3704
3705
3701 void CallConstructStub::Generate(MacroAssembler* masm) { 3706 void CallConstructStub::Generate(MacroAssembler* masm) {
3702 // rax : number of arguments 3707 // rax : number of arguments
3703 // rbx : cache cell for call target 3708 // rbx : cache cell for call target
3704 // rdi : constructor function 3709 // rdi : constructor function
3705 Label slow, non_function_call; 3710 Label slow, non_function_call;
3706 3711
3707 // Check that function is not a smi. 3712 // Check that function is not a smi.
3708 __ JumpIfSmi(rdi, &non_function_call); 3713 __ JumpIfSmi(rdi, &non_function_call);
3709 // Check that function is a JSFunction. 3714 // Check that function is a JSFunction.
3710 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); 3715 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx);
(...skipping 23 matching lines...) Expand all
3734 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); 3739 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
3735 __ bind(&do_call); 3740 __ bind(&do_call);
3736 // Set expected number of arguments to zero (not changing rax). 3741 // Set expected number of arguments to zero (not changing rax).
3737 __ Set(rbx, 0); 3742 __ Set(rbx, 0);
3738 __ SetCallKind(rcx, CALL_AS_METHOD); 3743 __ SetCallKind(rcx, CALL_AS_METHOD);
3739 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), 3744 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
3740 RelocInfo::CODE_TARGET); 3745 RelocInfo::CODE_TARGET);
3741 } 3746 }
3742 3747
3743 3748
3749 void CallConstructStub::FinishCode(Handle<Code> code) {
3750 code->set_has_function_cache(RecordCallTarget());
3751 }
3752
3753
3744 bool CEntryStub::NeedsImmovableCode() { 3754 bool CEntryStub::NeedsImmovableCode() {
3745 return false; 3755 return false;
3746 } 3756 }
3747 3757
3748 3758
3749 bool CEntryStub::IsPregenerated() { 3759 bool CEntryStub::IsPregenerated() {
3750 #ifdef _WIN64 3760 #ifdef _WIN64
3751 return result_size_ == 1; 3761 return result_size_ == 1;
3752 #else 3762 #else
3753 return true; 3763 return true;
(...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after
6298 xmm0, 6308 xmm0,
6299 &slow_elements); 6309 &slow_elements);
6300 __ ret(0); 6310 __ ret(0);
6301 } 6311 }
6302 6312
6303 #undef __ 6313 #undef __
6304 6314
6305 } } // namespace v8::internal 6315 } } // namespace v8::internal
6306 6316
6307 #endif // V8_TARGET_ARCH_X64 6317 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/code-stubs.h ('K') | « src/objects-inl.h ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698