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 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3252 __ movdbl(double_result, Operand(esp, 0)); | 3252 __ movdbl(double_result, Operand(esp, 0)); |
3253 __ add(esp, Immediate(kDoubleSize)); | 3253 __ add(esp, Immediate(kDoubleSize)); |
3254 | 3254 |
3255 __ bind(&done); | 3255 __ bind(&done); |
3256 __ IncrementCounter(counters->math_pow(), 1); | 3256 __ IncrementCounter(counters->math_pow(), 1); |
3257 __ ret(0); | 3257 __ ret(0); |
3258 } | 3258 } |
3259 } | 3259 } |
3260 | 3260 |
3261 | 3261 |
| 3262 void ArrayLengthStub::Generate(MacroAssembler* masm) { |
| 3263 // ----------- S t a t e ------------- |
| 3264 // -- ecx : name |
| 3265 // -- edx : receiver |
| 3266 // -- esp[0] : return address |
| 3267 // ----------------------------------- |
| 3268 Label miss; |
| 3269 |
| 3270 if (kind() == Code::KEYED_LOAD_IC) { |
| 3271 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); |
| 3272 __ j(not_equal, &miss); |
| 3273 } |
| 3274 |
| 3275 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss); |
| 3276 __ bind(&miss); |
| 3277 StubCompiler::GenerateLoadMiss(masm, kind()); |
| 3278 } |
| 3279 |
| 3280 |
3262 void StringLengthStub::Generate(MacroAssembler* masm) { | 3281 void StringLengthStub::Generate(MacroAssembler* masm) { |
3263 // ----------- S t a t e ------------- | 3282 // ----------- S t a t e ------------- |
3264 // -- ecx : name | 3283 // -- ecx : name |
3265 // -- edx : receiver | 3284 // -- edx : receiver |
3266 // -- esp[0] : return address | 3285 // -- esp[0] : return address |
3267 // ----------------------------------- | 3286 // ----------------------------------- |
3268 Label miss; | 3287 Label miss; |
3269 | 3288 |
3270 if (kind() == Code::KEYED_LOAD_IC) { | 3289 if (kind() == Code::KEYED_LOAD_IC) { |
3271 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); | 3290 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_symbol())); |
(...skipping 4284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7556 // Restore ecx. | 7575 // Restore ecx. |
7557 __ pop(ecx); | 7576 __ pop(ecx); |
7558 __ ret(0); | 7577 __ ret(0); |
7559 } | 7578 } |
7560 | 7579 |
7561 #undef __ | 7580 #undef __ |
7562 | 7581 |
7563 } } // namespace v8::internal | 7582 } } // namespace v8::internal |
7564 | 7583 |
7565 #endif // V8_TARGET_ARCH_IA32 | 7584 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |