OLD | NEW |
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 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 // Restore context register. | 2368 // Restore context register. |
2369 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2369 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2370 | 2370 |
2371 __ bind(&done); | 2371 __ bind(&done); |
2372 __ IncrementCounter(counters->math_pow(), 1); | 2372 __ IncrementCounter(counters->math_pow(), 1); |
2373 __ ret(0); | 2373 __ ret(0); |
2374 } | 2374 } |
2375 } | 2375 } |
2376 | 2376 |
2377 | 2377 |
2378 void ArrayLengthStub::Generate(MacroAssembler* masm) { | |
2379 Label miss; | |
2380 Register receiver; | |
2381 if (kind() == Code::KEYED_LOAD_IC) { | |
2382 // ----------- S t a t e ------------- | |
2383 // -- rax : key | |
2384 // -- rdx : receiver | |
2385 // -- rsp[0] : return address | |
2386 // ----------------------------------- | |
2387 __ Cmp(rax, masm->isolate()->factory()->length_string()); | |
2388 __ j(not_equal, &miss); | |
2389 receiver = rdx; | |
2390 } else { | |
2391 ASSERT(kind() == Code::LOAD_IC); | |
2392 // ----------- S t a t e ------------- | |
2393 // -- rax : receiver | |
2394 // -- rcx : name | |
2395 // -- rsp[0] : return address | |
2396 // ----------------------------------- | |
2397 receiver = rax; | |
2398 } | |
2399 | |
2400 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss); | |
2401 __ bind(&miss); | |
2402 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | |
2403 } | |
2404 | |
2405 | |
2406 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 2378 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
2407 Label miss; | 2379 Label miss; |
2408 Register receiver; | 2380 Register receiver; |
2409 if (kind() == Code::KEYED_LOAD_IC) { | 2381 if (kind() == Code::KEYED_LOAD_IC) { |
2410 // ----------- S t a t e ------------- | 2382 // ----------- S t a t e ------------- |
2411 // -- rax : key | 2383 // -- rax : key |
2412 // -- rdx : receiver | 2384 // -- rdx : receiver |
2413 // -- rsp[0] : return address | 2385 // -- rsp[0] : return address |
2414 // ----------------------------------- | 2386 // ----------------------------------- |
2415 __ Cmp(rax, masm->isolate()->factory()->prototype_string()); | 2387 __ Cmp(rax, masm->isolate()->factory()->prototype_string()); |
(...skipping 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6871 #endif | 6843 #endif |
6872 | 6844 |
6873 __ Ret(); | 6845 __ Ret(); |
6874 } | 6846 } |
6875 | 6847 |
6876 #undef __ | 6848 #undef __ |
6877 | 6849 |
6878 } } // namespace v8::internal | 6850 } } // namespace v8::internal |
6879 | 6851 |
6880 #endif // V8_TARGET_ARCH_X64 | 6852 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |