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 { | |
Jakob Kummerow
2013/01/21 16:35:15
again, an ASSERT(kind() == Code::LOAD_IC) please.
Toon Verwaest
2013/01/21 17:16:17
Done.
| |
2375 // ----------- S t a t e ------------- | |
2376 // -- rax : receiver | |
2377 // -- rcx : name | |
2378 // -- rsp[0] : return address | |
2379 // ----------------------------------- | |
2380 receiver = rax; | |
2381 } | |
2382 | |
2383 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss); | |
2384 __ bind(&miss); | |
2385 StubCompiler::GenerateLoadMiss(masm, kind_); | |
2386 } | |
2387 | |
2388 | |
2363 void StringLengthStub::Generate(MacroAssembler* masm) { | 2389 void StringLengthStub::Generate(MacroAssembler* masm) { |
2364 Label miss; | 2390 Label miss; |
2365 Register receiver; | 2391 Register receiver; |
2366 if (kind_ == Code::KEYED_LOAD_IC) { | 2392 if (kind_ == Code::KEYED_LOAD_IC) { |
2367 // ----------- S t a t e ------------- | 2393 // ----------- S t a t e ------------- |
2368 // -- rax : key | 2394 // -- rax : key |
2369 // -- rdx : receiver | 2395 // -- rdx : receiver |
2370 // -- rsp[0] : return address | 2396 // -- rsp[0] : return address |
2371 // ----------------------------------- | 2397 // ----------------------------------- |
2372 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); | 2398 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); |
(...skipping 4194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6567 #endif | 6593 #endif |
6568 | 6594 |
6569 __ Ret(); | 6595 __ Ret(); |
6570 } | 6596 } |
6571 | 6597 |
6572 #undef __ | 6598 #undef __ |
6573 | 6599 |
6574 } } // namespace v8::internal | 6600 } } // namespace v8::internal |
6575 | 6601 |
6576 #endif // V8_TARGET_ARCH_X64 | 6602 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |