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

Side by Side Diff: src/heap-inl.h

Issue 104203003: Remove unused trigonometric code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years 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 | « src/heap.h ('k') | src/hydrogen-instructions.h » ('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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 756 }
757 757
758 758
759 Address TranscendentalCache::cache_array_address() { 759 Address TranscendentalCache::cache_array_address() {
760 return reinterpret_cast<Address>(caches_); 760 return reinterpret_cast<Address>(caches_);
761 } 761 }
762 762
763 763
764 double TranscendentalCache::SubCache::Calculate(double input) { 764 double TranscendentalCache::SubCache::Calculate(double input) {
765 switch (type_) { 765 switch (type_) {
766 case ACOS:
767 return acos(input);
768 case ASIN:
769 return asin(input);
770 case ATAN:
771 return atan(input);
772 case COS:
773 return fast_cos(input);
774 case EXP:
775 return exp(input);
776 case LOG: 766 case LOG:
777 return fast_log(input); 767 return fast_log(input);
778 case SIN:
779 return fast_sin(input);
780 case TAN:
781 return fast_tan(input);
782 default: 768 default:
769 UNREACHABLE();
783 return 0.0; // Never happens. 770 return 0.0; // Never happens.
784 } 771 }
785 } 772 }
786 773
787 774
788 MaybeObject* TranscendentalCache::SubCache::Get(double input) { 775 MaybeObject* TranscendentalCache::SubCache::Get(double input) {
789 Converter c; 776 Converter c;
790 c.dbl = input; 777 c.dbl = input;
791 int hash = Hash(c); 778 int hash = Hash(c);
792 Element e = elements_[hash]; 779 Element e = elements_[hash];
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 #ifdef DEBUG 858 #ifdef DEBUG
872 Isolate* isolate = Isolate::Current(); 859 Isolate* isolate = Isolate::Current();
873 isolate->heap()->disallow_allocation_failure_ = old_state_; 860 isolate->heap()->disallow_allocation_failure_ = old_state_;
874 #endif 861 #endif
875 } 862 }
876 863
877 864
878 } } // namespace v8::internal 865 } } // namespace v8::internal
879 866
880 #endif // V8_HEAP_INL_H_ 867 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698