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 StringLengthStub::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::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, |
| 3276 support_wrapper_); |
| 3277 __ bind(&miss); |
| 3278 StubCompiler::GenerateLoadMiss(masm, kind()); |
| 3279 } |
| 3280 |
| 3281 |
3262 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 3282 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
3263 // The key is in edx and the parameter count is in eax. | 3283 // The key is in edx and the parameter count is in eax. |
3264 | 3284 |
3265 // The displacement is used for skipping the frame pointer on the | 3285 // The displacement is used for skipping the frame pointer on the |
3266 // stack. It is the offset of the last parameter (if any) relative | 3286 // stack. It is the offset of the last parameter (if any) relative |
3267 // to the frame pointer. | 3287 // to the frame pointer. |
3268 static const int kDisplacement = 1 * kPointerSize; | 3288 static const int kDisplacement = 1 * kPointerSize; |
3269 | 3289 |
3270 // Check that the key is a smi. | 3290 // Check that the key is a smi. |
3271 Label slow; | 3291 Label slow; |
(...skipping 4264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7536 // Restore ecx. | 7556 // Restore ecx. |
7537 __ pop(ecx); | 7557 __ pop(ecx); |
7538 __ ret(0); | 7558 __ ret(0); |
7539 } | 7559 } |
7540 | 7560 |
7541 #undef __ | 7561 #undef __ |
7542 | 7562 |
7543 } } // namespace v8::internal | 7563 } } // namespace v8::internal |
7544 | 7564 |
7545 #endif // V8_TARGET_ARCH_IA32 | 7565 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |