V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
c
d
g
i
k
n
p
r
s
t
Functions
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
a
c
d
e
h
k
l
n
o
s
Typedefs
Enumerations
+
Files
File List
Examples
▼
V8 API Reference Guide
The V8 public C++ API
▶
Namespaces
▶
Classes
▼
Files
▶
File List
▶
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
codegen.cc
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
#include "src/codegen.h"
6
7
#include <cmath>
8
#include <memory>
9
10
#include "src/flags.h"
11
12
namespace
v8
{
13
namespace
internal {
14
15
#define UNARY_MATH_FUNCTION(name, generator) \
16
static UnaryMathFunction fast_##name##_function = nullptr; \
17
double std_##name(double x) { return std::name(x); } \
18
void init_fast_##name##_function() { \
19
if (FLAG_fast_math) fast_##name##_function = generator(); \
20
if (!fast_##name##_function) fast_##name##_function = std_##name; \
21
} \
22
void lazily_initialize_fast_##name() { \
23
if (!fast_##name##_function) init_fast_##name##_function(); \
24
} \
25
double fast_##name(double x) { return (*fast_##name##_function)(x); }
26
27
UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction)
28
29
#undef UNARY_MATH_FUNCTION
30
31
}
// namespace internal
32
}
// namespace v8
v8
Definition:
libplatform.h:13
v8
src
codegen.cc
Generated on Tue Dec 25 2018 14:38:25 by
1.8.14