| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 3428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3439 } | 3439 } |
| 3440 | 3440 |
| 3441 | 3441 |
| 3442 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { | 3442 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { |
| 3443 // Load the arguments on the stack and call the runtime function. | 3443 // Load the arguments on the stack and call the runtime function. |
| 3444 ZoneList<Expression*>* args = expr->arguments(); | 3444 ZoneList<Expression*>* args = expr->arguments(); |
| 3445 ASSERT(args->length() == 2); | 3445 ASSERT(args->length() == 2); |
| 3446 VisitForStackValue(args->at(0)); | 3446 VisitForStackValue(args->at(0)); |
| 3447 VisitForStackValue(args->at(1)); | 3447 VisitForStackValue(args->at(1)); |
| 3448 | 3448 |
| 3449 if (CpuFeatures::IsSupported(SSE2)) { | 3449 MathPowStub stub(isolate(), MathPowStub::ON_STACK); |
| 3450 MathPowStub stub(isolate(), MathPowStub::ON_STACK); | 3450 __ CallStub(&stub); |
| 3451 __ CallStub(&stub); | |
| 3452 } else { | |
| 3453 __ CallRuntime(Runtime::kHiddenMathPowSlow, 2); | |
| 3454 } | |
| 3455 context()->Plug(eax); | 3451 context()->Plug(eax); |
| 3456 } | 3452 } |
| 3457 | 3453 |
| 3458 | 3454 |
| 3459 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { | 3455 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { |
| 3460 ZoneList<Expression*>* args = expr->arguments(); | 3456 ZoneList<Expression*>* args = expr->arguments(); |
| 3461 ASSERT(args->length() == 2); | 3457 ASSERT(args->length() == 2); |
| 3462 | 3458 |
| 3463 VisitForStackValue(args->at(0)); // Load the object. | 3459 VisitForStackValue(args->at(0)); // Load the object. |
| 3464 VisitForAccumulatorValue(args->at(1)); // Load the value. | 3460 VisitForAccumulatorValue(args->at(1)); // Load the value. |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4828 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4824 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4829 Assembler::target_address_at(call_target_address, | 4825 Assembler::target_address_at(call_target_address, |
| 4830 unoptimized_code)); | 4826 unoptimized_code)); |
| 4831 return OSR_AFTER_STACK_CHECK; | 4827 return OSR_AFTER_STACK_CHECK; |
| 4832 } | 4828 } |
| 4833 | 4829 |
| 4834 | 4830 |
| 4835 } } // namespace v8::internal | 4831 } } // namespace v8::internal |
| 4836 | 4832 |
| 4837 #endif // V8_TARGET_ARCH_IA32 | 4833 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |