OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 __ add(esp, Immediate(kDoubleSize)); | 878 __ add(esp, Immediate(kDoubleSize)); |
879 | 879 |
880 __ bind(&done); | 880 __ bind(&done); |
881 __ IncrementCounter(counters->math_pow(), 1); | 881 __ IncrementCounter(counters->math_pow(), 1); |
882 __ ret(0); | 882 __ ret(0); |
883 } | 883 } |
884 } | 884 } |
885 | 885 |
886 | 886 |
887 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 887 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
888 // ----------- S t a t e ------------- | |
889 // -- ecx : name | |
890 // -- edx : receiver | |
891 // -- esp[0] : return address | |
892 // ----------------------------------- | |
893 Label miss; | 888 Label miss; |
| 889 Register receiver = LoadIC::ReceiverRegister(); |
894 | 890 |
895 if (kind() == Code::KEYED_LOAD_IC) { | 891 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax, |
896 __ cmp(ecx, Immediate(isolate()->factory()->prototype_string())); | 892 ebx, &miss); |
897 __ j(not_equal, &miss); | |
898 } | |
899 | |
900 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); | |
901 __ bind(&miss); | 893 __ bind(&miss); |
902 StubCompiler::TailCallBuiltin( | 894 PropertyAccessCompiler::TailCallBuiltin( |
903 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); | 895 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
904 } | 896 } |
905 | 897 |
906 | 898 |
907 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 899 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
908 // The key is in edx and the parameter count is in eax. | 900 // The key is in edx and the parameter count is in eax. |
909 | 901 |
910 // The displacement is used for skipping the frame pointer on the | 902 // The displacement is used for skipping the frame pointer on the |
911 // stack. It is the offset of the last parameter (if any) relative | 903 // stack. It is the offset of the last parameter (if any) relative |
912 // to the frame pointer. | 904 // to the frame pointer. |
913 static const int kDisplacement = 1 * kPointerSize; | 905 static const int kDisplacement = 1 * kPointerSize; |
(...skipping 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4976 Operand(ebp, 7 * kPointerSize), | 4968 Operand(ebp, 7 * kPointerSize), |
4977 NULL); | 4969 NULL); |
4978 } | 4970 } |
4979 | 4971 |
4980 | 4972 |
4981 #undef __ | 4973 #undef __ |
4982 | 4974 |
4983 } } // namespace v8::internal | 4975 } } // namespace v8::internal |
4984 | 4976 |
4985 #endif // V8_TARGET_ARCH_IA32 | 4977 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |