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

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

Issue 70003004: Reland "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: fix 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 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 ASSERT_EQ(2, args->length()); 3755 ASSERT_EQ(2, args->length());
3756 VisitForStackValue(args->at(0)); 3756 VisitForStackValue(args->at(0));
3757 VisitForStackValue(args->at(1)); 3757 VisitForStackValue(args->at(1));
3758 3758
3759 StringCompareStub stub; 3759 StringCompareStub stub;
3760 __ CallStub(&stub); 3760 __ CallStub(&stub);
3761 context()->Plug(r0); 3761 context()->Plug(r0);
3762 } 3762 }
3763 3763
3764 3764
3765 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) {
3766 // Load the argument on the stack and call the stub.
3767 TranscendentalCacheStub stub(TranscendentalCache::SIN,
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
3777 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) {
3778 // Load the argument on the stack and call the stub.
3779 TranscendentalCacheStub stub(TranscendentalCache::COS,
3780 TranscendentalCacheStub::TAGGED);
3781 ZoneList<Expression*>* args = expr->arguments();
3782 ASSERT(args->length() == 1);
3783 VisitForStackValue(args->at(0));
3784 __ CallStub(&stub);
3785 context()->Plug(r0);
3786 }
3787
3788
3789 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) {
3790 // Load the argument on the stack and call the stub.
3791 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3792 TranscendentalCacheStub::TAGGED);
3793 ZoneList<Expression*>* args = expr->arguments();
3794 ASSERT(args->length() == 1);
3795 VisitForStackValue(args->at(0));
3796 __ CallStub(&stub);
3797 context()->Plug(r0);
3798 }
3799
3800
3801 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { 3765 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
3802 // Load the argument on the stack and call the stub. 3766 // Load the argument on the stack and call the stub.
3803 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3767 TranscendentalCacheStub stub(TranscendentalCache::LOG,
3804 TranscendentalCacheStub::TAGGED); 3768 TranscendentalCacheStub::TAGGED);
3805 ZoneList<Expression*>* args = expr->arguments(); 3769 ZoneList<Expression*>* args = expr->arguments();
3806 ASSERT(args->length() == 1); 3770 ASSERT(args->length() == 1);
3807 VisitForStackValue(args->at(0)); 3771 VisitForStackValue(args->at(0));
3808 __ CallStub(&stub); 3772 __ CallStub(&stub);
3809 context()->Plug(r0); 3773 context()->Plug(r0);
3810 } 3774 }
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
5014 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4978 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
5015 reinterpret_cast<uint32_t>( 4979 reinterpret_cast<uint32_t>(
5016 isolate->builtins()->OsrAfterStackCheck()->entry())); 4980 isolate->builtins()->OsrAfterStackCheck()->entry()));
5017 return OSR_AFTER_STACK_CHECK; 4981 return OSR_AFTER_STACK_CHECK;
5018 } 4982 }
5019 4983
5020 4984
5021 } } // namespace v8::internal 4985 } } // namespace v8::internal
5022 4986
5023 #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