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 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3679 | 3679 |
3680 VisitForStackValue(args->at(0)); | 3680 VisitForStackValue(args->at(0)); |
3681 VisitForStackValue(args->at(1)); | 3681 VisitForStackValue(args->at(1)); |
3682 | 3682 |
3683 StringCompareStub stub; | 3683 StringCompareStub stub; |
3684 __ CallStub(&stub); | 3684 __ CallStub(&stub); |
3685 context()->Plug(rax); | 3685 context()->Plug(rax); |
3686 } | 3686 } |
3687 | 3687 |
3688 | 3688 |
3689 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) { | |
3690 // Load the argument on the stack and call the stub. | |
3691 TranscendentalCacheStub stub(TranscendentalCache::SIN, | |
3692 TranscendentalCacheStub::TAGGED); | |
3693 ZoneList<Expression*>* args = expr->arguments(); | |
3694 ASSERT(args->length() == 1); | |
3695 VisitForStackValue(args->at(0)); | |
3696 __ CallStub(&stub); | |
3697 context()->Plug(rax); | |
3698 } | |
3699 | |
3700 | |
3701 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) { | |
3702 // Load the argument on the stack and call the stub. | |
3703 TranscendentalCacheStub stub(TranscendentalCache::COS, | |
3704 TranscendentalCacheStub::TAGGED); | |
3705 ZoneList<Expression*>* args = expr->arguments(); | |
3706 ASSERT(args->length() == 1); | |
3707 VisitForStackValue(args->at(0)); | |
3708 __ CallStub(&stub); | |
3709 context()->Plug(rax); | |
3710 } | |
3711 | |
3712 | |
3713 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) { | |
3714 // Load the argument on the stack and call the stub. | |
3715 TranscendentalCacheStub stub(TranscendentalCache::TAN, | |
3716 TranscendentalCacheStub::TAGGED); | |
3717 ZoneList<Expression*>* args = expr->arguments(); | |
3718 ASSERT(args->length() == 1); | |
3719 VisitForStackValue(args->at(0)); | |
3720 __ CallStub(&stub); | |
3721 context()->Plug(rax); | |
3722 } | |
3723 | |
3724 | |
3725 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { | 3689 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
3726 // Load the argument on the stack and call the stub. | 3690 // Load the argument on the stack and call the stub. |
3727 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3691 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
3728 TranscendentalCacheStub::TAGGED); | 3692 TranscendentalCacheStub::TAGGED); |
3729 ZoneList<Expression*>* args = expr->arguments(); | 3693 ZoneList<Expression*>* args = expr->arguments(); |
3730 ASSERT(args->length() == 1); | 3694 ASSERT(args->length() == 1); |
3731 VisitForStackValue(args->at(0)); | 3695 VisitForStackValue(args->at(0)); |
3732 __ CallStub(&stub); | 3696 __ CallStub(&stub); |
3733 context()->Plug(rax); | 3697 context()->Plug(rax); |
3734 } | 3698 } |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4987 | 4951 |
4988 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4952 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4989 Assembler::target_address_at(call_target_address)); | 4953 Assembler::target_address_at(call_target_address)); |
4990 return OSR_AFTER_STACK_CHECK; | 4954 return OSR_AFTER_STACK_CHECK; |
4991 } | 4955 } |
4992 | 4956 |
4993 | 4957 |
4994 } } // namespace v8::internal | 4958 } } // namespace v8::internal |
4995 | 4959 |
4996 #endif // V8_TARGET_ARCH_X64 | 4960 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |