1 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_CODEGEN_H_ 6 #define V8_CODEGEN_H_ 7 8 #include "src/globals.h" 9 10 namespace v8 { 11 namespace internal { 12 13 // Results of the library implementation of transcendental functions may differ 14 // from the one we use in our generated code. Therefore we use the same 15 // generated code both in runtime and compiled code. 16 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); 17 18 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); 19 20 // Custom implementation of math functions. 21 double fast_sqrt(double input, Isolate* isolate); 22 void lazily_initialize_fast_sqrt(Isolate* isolate); 23 24 } // namespace internal 25 } // namespace v8 26 27 #endif // V8_CODEGEN_H_ 28