Index: src/compiler/type-hint-analyzer.h |
diff --git a/src/compiler/type-hint-analyzer.h b/src/compiler/type-hint-analyzer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ee3bebfd7cb4139b212c5655d7c4214cacd317e1 |
--- /dev/null |
+++ b/src/compiler/type-hint-analyzer.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8_COMPILER_TYPE_HINT_ANALYZER_H_ |
+#define V8_COMPILER_TYPE_HINT_ANALYZER_H_ |
+ |
+#include "src/handles.h" |
+#include "src/utils.h" |
+#include "src/zone-containers.h" |
+ |
+namespace v8 { |
+namespace internal { |
+namespace compiler { |
+ |
+// Forward declarations. |
+class BinaryOperationHints; |
+ |
+ |
+// The result of analyzing type hints. |
+class TypeHintAnalysis final : public ZoneObject { |
+ public: |
+ typedef ZoneMap<TypeFeedbackId, Handle<Code>> Infos; |
+ |
+ explicit TypeHintAnalysis(Infos const& infos) : infos_(infos) {} |
+ |
+ bool GetBinaryOperationHints(TypeFeedbackId id, |
+ BinaryOperationHints* hints) const; |
+ |
+ private: |
+ Infos const infos_; |
+}; |
+ |
+ |
+// The class that performs type hint analysis on the fullcodegen code object. |
+class TypeHintAnalyzer final { |
+ public: |
+ explicit TypeHintAnalyzer(Zone* zone) : zone_(zone) {} |
+ |
+ TypeHintAnalysis* Analyze(Handle<Code> code); |
+ |
+ private: |
+ Zone* zone() const { return zone_; } |
+ |
+ Zone* const zone_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TypeHintAnalyzer); |
+}; |
+ |
+} // namespace compiler |
+} // namespace internal |
+} // namespace v8 |
+ |
+#endif // V8_COMPILER_TYPE_HINT_ANALYZER_H_ |