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 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2353 // Restore context register. | 2353 // Restore context register. |
2354 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2354 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2355 | 2355 |
2356 __ bind(&done); | 2356 __ bind(&done); |
2357 __ IncrementCounter(counters->math_pow(), 1); | 2357 __ IncrementCounter(counters->math_pow(), 1); |
2358 __ ret(0); | 2358 __ ret(0); |
2359 } | 2359 } |
2360 } | 2360 } |
2361 | 2361 |
2362 | 2362 |
| 2363 void ArrayLengthStub::Generate(MacroAssembler* masm) { |
| 2364 Label miss; |
| 2365 Register receiver; |
| 2366 if (kind() == Code::KEYED_LOAD_IC) { |
| 2367 // ----------- S t a t e ------------- |
| 2368 // -- rax : key |
| 2369 // -- rdx : receiver |
| 2370 // -- rsp[0] : return address |
| 2371 // ----------------------------------- |
| 2372 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); |
| 2373 receiver = rdx; |
| 2374 } else { |
| 2375 ASSERT(kind() == Code::LOAD_IC); |
| 2376 // ----------- S t a t e ------------- |
| 2377 // -- rax : receiver |
| 2378 // -- rcx : name |
| 2379 // -- rsp[0] : return address |
| 2380 // ----------------------------------- |
| 2381 receiver = rax; |
| 2382 } |
| 2383 |
| 2384 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss); |
| 2385 __ bind(&miss); |
| 2386 StubCompiler::GenerateLoadMiss(masm, kind()); |
| 2387 } |
| 2388 |
| 2389 |
2363 void StringLengthStub::Generate(MacroAssembler* masm) { | 2390 void StringLengthStub::Generate(MacroAssembler* masm) { |
2364 Label miss; | 2391 Label miss; |
2365 Register receiver; | 2392 Register receiver; |
2366 if (kind() == Code::KEYED_LOAD_IC) { | 2393 if (kind() == Code::KEYED_LOAD_IC) { |
2367 // ----------- S t a t e ------------- | 2394 // ----------- S t a t e ------------- |
2368 // -- rax : key | 2395 // -- rax : key |
2369 // -- rdx : receiver | 2396 // -- rdx : receiver |
2370 // -- rsp[0] : return address | 2397 // -- rsp[0] : return address |
2371 // ----------------------------------- | 2398 // ----------------------------------- |
2372 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); | 2399 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); |
(...skipping 4195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6568 #endif | 6595 #endif |
6569 | 6596 |
6570 __ Ret(); | 6597 __ Ret(); |
6571 } | 6598 } |
6572 | 6599 |
6573 #undef __ | 6600 #undef __ |
6574 | 6601 |
6575 } } // namespace v8::internal | 6602 } } // namespace v8::internal |
6576 | 6603 |
6577 #endif // V8_TARGET_ARCH_X64 | 6604 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |