Index: src/ia32/codegen-ia32.h |
diff --git a/src/ia32/codegen-ia32.h b/src/ia32/codegen-ia32.h |
index 99dc340b64d1904caee63277b885a9450b258344..b84a6bbaaf1e910a90c8196455c446313d7b285f 100644 |
--- a/src/ia32/codegen-ia32.h |
+++ b/src/ia32/codegen-ia32.h |
@@ -588,6 +588,10 @@ class CodeGenerator: public AstVisitor { |
// Fast support for number to string. |
void GenerateNumberToString(ZoneList<Expression*>* args); |
+ // Fast call to transcendental functions. |
+ void GenerateMathSin(ZoneList<Expression*>* args); |
+ void GenerateMathCos(ZoneList<Expression*>* args); |
+ |
// Simple condition analysis. |
enum ConditionAnalysis { |
ALWAYS_TRUE, |
@@ -655,6 +659,22 @@ class CodeGenerator: public AstVisitor { |
}; |
+// Compute a transcendental math function natively, or call the |
+// TranscendentalCache runtime function. |
+class TranscendentalCacheStub: public CodeStub { |
+ public: |
+ explicit TranscendentalCacheStub(TranscendentalCache::Type type) |
+ : type_(type) {} |
+ void Generate(MacroAssembler* masm); |
+ private: |
+ TranscendentalCache::Type type_; |
+ Major MajorKey() { return TranscendentalCache; } |
+ int MinorKey() { return type_; } |
+ Runtime::FunctionId RuntimeFunction(); |
+ void GenerateOperation(MacroAssembler* masm); |
+}; |
+ |
+ |
// Flag that indicates how to generate code for the stub GenericBinaryOpStub. |
enum GenericBinaryFlags { |
NO_GENERIC_BINARY_FLAGS = 0, |