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

Side by Side Diff: src/ia32/code-stubs-ia32.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 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); 4695 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi);
4696 __ Set(eax, Immediate(argc_)); 4696 __ Set(eax, Immediate(argc_));
4697 __ Set(ebx, Immediate(0)); 4697 __ Set(ebx, Immediate(0));
4698 __ SetCallKind(ecx, CALL_AS_METHOD); 4698 __ SetCallKind(ecx, CALL_AS_METHOD);
4699 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); 4699 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION);
4700 Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline(); 4700 Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline();
4701 __ jmp(adaptor, RelocInfo::CODE_TARGET); 4701 __ jmp(adaptor, RelocInfo::CODE_TARGET);
4702 } 4702 }
4703 4703
4704 4704
4705 void CallFunctionStub::FinishCode(Handle<Code> code) {
4706 code->set_has_function_cache(RecordCallTarget());
4707 }
4708
4709
4705 void CallConstructStub::Generate(MacroAssembler* masm) { 4710 void CallConstructStub::Generate(MacroAssembler* masm) {
4706 // eax : number of arguments 4711 // eax : number of arguments
4707 // ebx : cache cell for call target 4712 // ebx : cache cell for call target
4708 // edi : constructor function 4713 // edi : constructor function
4709 Label slow, non_function_call; 4714 Label slow, non_function_call;
4710 4715
4711 // Check that function is not a smi. 4716 // Check that function is not a smi.
4712 __ JumpIfSmi(edi, &non_function_call); 4717 __ JumpIfSmi(edi, &non_function_call);
4713 // Check that function is a JSFunction. 4718 // Check that function is a JSFunction.
4714 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); 4719 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
(...skipping 24 matching lines...) Expand all
4739 __ bind(&do_call); 4744 __ bind(&do_call);
4740 // Set expected number of arguments to zero (not changing eax). 4745 // Set expected number of arguments to zero (not changing eax).
4741 __ Set(ebx, Immediate(0)); 4746 __ Set(ebx, Immediate(0));
4742 Handle<Code> arguments_adaptor = 4747 Handle<Code> arguments_adaptor =
4743 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); 4748 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
4744 __ SetCallKind(ecx, CALL_AS_METHOD); 4749 __ SetCallKind(ecx, CALL_AS_METHOD);
4745 __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET); 4750 __ jmp(arguments_adaptor, RelocInfo::CODE_TARGET);
4746 } 4751 }
4747 4752
4748 4753
4754 void CallConstructStub::FinishCode(Handle<Code> code) {
4755 code->set_has_function_cache(RecordCallTarget());
4756 }
4757
4758
4749 bool CEntryStub::NeedsImmovableCode() { 4759 bool CEntryStub::NeedsImmovableCode() {
4750 return false; 4760 return false;
4751 } 4761 }
4752 4762
4753 4763
4754 bool CEntryStub::IsPregenerated() { 4764 bool CEntryStub::IsPregenerated() {
4755 return (!save_doubles_ || ISOLATE->fp_stubs_generated()) && 4765 return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
4756 result_size_ == 1; 4766 result_size_ == 1;
4757 } 4767 }
4758 4768
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
7372 false); 7382 false);
7373 __ pop(edx); 7383 __ pop(edx);
7374 __ ret(0); 7384 __ ret(0);
7375 } 7385 }
7376 7386
7377 #undef __ 7387 #undef __
7378 7388
7379 } } // namespace v8::internal 7389 } } // namespace v8::internal
7380 7390
7381 #endif // V8_TARGET_ARCH_IA32 7391 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/code-stubs.h ('K') | « src/debug.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698