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/stub-cache-x64.cc

Issue 10515008: Added LoadIC stub for getters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed useless fallback Created 8 years, 6 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
« src/stub-cache.cc ('K') | « src/stub-cache.cc ('k') | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 GenerateLoadCallback(object, holder, rax, rcx, rdx, rbx, rdi, callback, 2690 GenerateLoadCallback(object, holder, rax, rcx, rdx, rbx, rdi, callback,
2691 name, &miss); 2691 name, &miss);
2692 __ bind(&miss); 2692 __ bind(&miss);
2693 GenerateLoadMiss(masm(), Code::LOAD_IC); 2693 GenerateLoadMiss(masm(), Code::LOAD_IC);
2694 2694
2695 // Return the generated code. 2695 // Return the generated code.
2696 return GetCode(CALLBACKS, name); 2696 return GetCode(CALLBACKS, name);
2697 } 2697 }
2698 2698
2699 2699
2700 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
2701 Handle<String> name,
2702 Handle<JSObject> receiver,
2703 Handle<JSObject> holder,
2704 Handle<JSFunction> getter) {
2705 // ----------- S t a t e -------------
2706 // -- rax : receiver
2707 // -- rcx : name
2708 // -- rsp[0] : return address
2709 // -----------------------------------
2710 Label miss;
2711
2712 // Check that the maps haven't changed.
2713 __ JumpIfSmi(rax, &miss);
2714 CheckPrototypes(receiver, rax, holder, rbx, rdx, rdi, name, &miss);
2715
2716 {
2717 FrameScope scope(masm(), StackFrame::INTERNAL);
2718
2719 // Call the JavaScript getter with the receiver on the stack.
2720 __ push(rax);
2721 __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION,
2722 NullCallWrapper(), CALL_AS_METHOD);
2723
2724 // Restore context register.
2725 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
2726 }
2727 __ ret(0);
2728
2729 __ bind(&miss);
2730 GenerateLoadMiss(masm(), Code::LOAD_IC);
2731
2732 // Return the generated code.
2733 return GetCode(CALLBACKS, name);
2734 }
2735
2736
2700 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, 2737 Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object,
2701 Handle<JSObject> holder, 2738 Handle<JSObject> holder,
2702 Handle<JSFunction> value, 2739 Handle<JSFunction> value,
2703 Handle<String> name) { 2740 Handle<String> name) {
2704 // ----------- S t a t e ------------- 2741 // ----------- S t a t e -------------
2705 // -- rax : receiver 2742 // -- rax : receiver
2706 // -- rcx : name 2743 // -- rcx : name
2707 // -- rsp[0] : return address 2744 // -- rsp[0] : return address
2708 // ----------------------------------- 2745 // -----------------------------------
2709 Label miss; 2746 Label miss;
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
3911 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3948 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3912 } 3949 }
3913 } 3950 }
3914 3951
3915 3952
3916 #undef __ 3953 #undef __
3917 3954
3918 } } // namespace v8::internal 3955 } } // namespace v8::internal
3919 3956
3920 #endif // V8_TARGET_ARCH_X64 3957 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/stub-cache.cc ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698