Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 59153007: Revert "Implement Math.sin, cos and tan using table lookup and spline interpolation." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3708 matching lines...) Expand 10 before | Expand all | Expand 10 after
3719 ASSERT_EQ(2, args->length()); 3719 ASSERT_EQ(2, args->length());
3720 VisitForStackValue(args->at(0)); 3720 VisitForStackValue(args->at(0));
3721 VisitForStackValue(args->at(1)); 3721 VisitForStackValue(args->at(1));
3722 3722
3723 StringCompareStub stub; 3723 StringCompareStub stub;
3724 __ CallStub(&stub); 3724 __ CallStub(&stub);
3725 context()->Plug(r0); 3725 context()->Plug(r0);
3726 } 3726 }
3727 3727
3728 3728
3729 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { 3729 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) {
3730 // Load the argument on the stack and call the stub. 3730 // Load the argument on the stack and call the stub.
3731 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3731 TranscendentalCacheStub stub(TranscendentalCache::SIN,
3732 TranscendentalCacheStub::TAGGED); 3732 TranscendentalCacheStub::TAGGED);
3733 ZoneList<Expression*>* args = expr->arguments(); 3733 ZoneList<Expression*>* args = expr->arguments();
3734 ASSERT(args->length() == 1); 3734 ASSERT(args->length() == 1);
3735 VisitForStackValue(args->at(0)); 3735 VisitForStackValue(args->at(0));
3736 __ CallStub(&stub); 3736 __ CallStub(&stub);
3737 context()->Plug(r0); 3737 context()->Plug(r0);
3738 } 3738 }
3739 3739
3740 3740
3741 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) {
3742 // Load the argument on the stack and call the stub.
3743 TranscendentalCacheStub stub(TranscendentalCache::COS,
3744 TranscendentalCacheStub::TAGGED);
3745 ZoneList<Expression*>* args = expr->arguments();
3746 ASSERT(args->length() == 1);
3747 VisitForStackValue(args->at(0));
3748 __ CallStub(&stub);
3749 context()->Plug(r0);
3750 }
3751
3752
3753 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) {
3754 // Load the argument on the stack and call the stub.
3755 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3756 TranscendentalCacheStub::TAGGED);
3757 ZoneList<Expression*>* args = expr->arguments();
3758 ASSERT(args->length() == 1);
3759 VisitForStackValue(args->at(0));
3760 __ CallStub(&stub);
3761 context()->Plug(r0);
3762 }
3763
3764
3765 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
3766 // Load the argument on the stack and call the stub.
3767 TranscendentalCacheStub stub(TranscendentalCache::LOG,
3768 TranscendentalCacheStub::TAGGED);
3769 ZoneList<Expression*>* args = expr->arguments();
3770 ASSERT(args->length() == 1);
3771 VisitForStackValue(args->at(0));
3772 __ CallStub(&stub);
3773 context()->Plug(r0);
3774 }
3775
3776
3741 void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) { 3777 void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) {
3742 // Load the argument on the stack and call the runtime function. 3778 // Load the argument on the stack and call the runtime function.
3743 ZoneList<Expression*>* args = expr->arguments(); 3779 ZoneList<Expression*>* args = expr->arguments();
3744 ASSERT(args->length() == 1); 3780 ASSERT(args->length() == 1);
3745 VisitForStackValue(args->at(0)); 3781 VisitForStackValue(args->at(0));
3746 __ CallRuntime(Runtime::kMath_sqrt, 1); 3782 __ CallRuntime(Runtime::kMath_sqrt, 1);
3747 context()->Plug(r0); 3783 context()->Plug(r0);
3748 } 3784 }
3749 3785
3750
3751 void FullCodeGenerator::EmitMathFloor(CallRuntime* expr) {
3752 // Load the argument on the stack and call the runtime function.
3753 ZoneList<Expression*>* args = expr->arguments();
3754 ASSERT(args->length() == 1);
3755 VisitForStackValue(args->at(0));
3756 __ CallRuntime(Runtime::kMath_floor, 1);
3757 context()->Plug(r0);
3758 }
3759
3760 3786
3761 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { 3787 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
3762 ZoneList<Expression*>* args = expr->arguments(); 3788 ZoneList<Expression*>* args = expr->arguments();
3763 ASSERT(args->length() >= 2); 3789 ASSERT(args->length() >= 2);
3764 3790
3765 int arg_count = args->length() - 2; // 2 ~ receiver and function. 3791 int arg_count = args->length() - 2; // 2 ~ receiver and function.
3766 for (int i = 0; i < arg_count + 1; i++) { 3792 for (int i = 0; i < arg_count + 1; i++) {
3767 VisitForStackValue(args->at(i)); 3793 VisitForStackValue(args->at(i));
3768 } 3794 }
3769 VisitForAccumulatorValue(args->last()); // Function. 3795 VisitForAccumulatorValue(args->last()); // Function.
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
4952 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4978 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4953 reinterpret_cast<uint32_t>( 4979 reinterpret_cast<uint32_t>(
4954 isolate->builtins()->OsrAfterStackCheck()->entry())); 4980 isolate->builtins()->OsrAfterStackCheck()->entry()));
4955 return OSR_AFTER_STACK_CHECK; 4981 return OSR_AFTER_STACK_CHECK;
4956 } 4982 }
4957 4983
4958 4984
4959 } } // namespace v8::internal 4985 } } // namespace v8::internal
4960 4986
4961 #endif // V8_TARGET_ARCH_ARM 4987 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698