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

Unified Diff: src/trig-table.h

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/trig-table.h
diff --git a/src/hydrogen-infer-types.h b/src/trig-table.h
similarity index 67%
copy from src/hydrogen-infer-types.h
copy to src/trig-table.h
index cfcbf3549ba51603ea9f8aabd55f4d6070ad0488..081c0389ae2d8d1b1c652404162e7ea0d8c4fec6 100644
--- a/src/hydrogen-infer-types.h
+++ b/src/trig-table.h
@@ -25,35 +25,37 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_INFER_TYPES_H_
-#define V8_HYDROGEN_INFER_TYPES_H_
+#ifndef V8_TRIG_TABLE_H_
+#define V8_TRIG_TABLE_H_
-#include "hydrogen.h"
namespace v8 {
namespace internal {
-
-class HInferTypesPhase : public HPhase {
+class TrigonometricLookupTable : public AllStatic {
public:
- explicit HInferTypesPhase(HGraph* graph)
- : HPhase("H_Inferring types", graph), worklist_(8, zone()),
- in_worklist_(graph->GetMaximumValueID(), zone()) { }
-
- void Run() {
- InferTypes(0, graph()->blocks()->length() - 1);
+ // Casting away const-ness to use as argument for typed array constructor.
+ static void* sin_table() {
+ return const_cast<double*>(&kSinTable[0]);
}
- private:
- void InferTypes(int from_inclusive, int to_inclusive);
+ static void* cos_x_interval_table() {
+ return const_cast<double*>(&kCosXIntervalTable[0]);
+ }
- ZoneList<HValue*> worklist_;
- BitVector in_worklist_;
+ static double samples_over_pi_half() { return kSamplesOverPiHalf; }
+ static int samples() { return kSamples; }
+ static int table_num_bytes() { return kTableSize * sizeof(*kSinTable); }
+ static int table_size() { return kTableSize; }
- DISALLOW_COPY_AND_ASSIGN(HInferTypesPhase);
+ private:
+ static const double kSinTable[];
+ static const double kCosXIntervalTable[];
+ static const int kSamples;
+ static const int kTableSize;
+ static const double kSamplesOverPiHalf;
};
-
} } // namespace v8::internal
-#endif // V8_HYDROGEN_INFER_TYPES_H_
+#endif // V8_TRIG_TABLE_H_
« include/v8-platform.h ('K') | « src/sweeper-thread.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698