OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CODEGEN_H_ | 5 #ifndef V8_CODEGEN_H_ |
6 #define V8_CODEGEN_H_ | 6 #define V8_CODEGEN_H_ |
7 | 7 |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/runtime/runtime.h" | 9 #include "src/runtime/runtime.h" |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 private: | 86 private: |
87 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 87 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
88 }; | 88 }; |
89 | 89 |
90 | 90 |
91 // Results of the library implementation of transcendental functions may differ | 91 // Results of the library implementation of transcendental functions may differ |
92 // from the one we use in our generated code. Therefore we use the same | 92 // from the one we use in our generated code. Therefore we use the same |
93 // generated code both in runtime and compiled code. | 93 // generated code both in runtime and compiled code. |
94 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); | 94 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); |
95 | 95 |
| 96 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate); |
96 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); | 97 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); |
97 | 98 |
98 | 99 |
99 double modulo(double x, double y); | 100 double modulo(double x, double y); |
100 | 101 |
101 // Custom implementation of math functions. | 102 // Custom implementation of math functions. |
| 103 double fast_exp(double input, Isolate* isolate); |
102 double fast_sqrt(double input, Isolate* isolate); | 104 double fast_sqrt(double input, Isolate* isolate); |
| 105 void lazily_initialize_fast_exp(Isolate* isolate); |
103 void lazily_initialize_fast_sqrt(Isolate* isolate); | 106 void lazily_initialize_fast_sqrt(Isolate* isolate); |
104 | 107 |
105 | 108 |
106 class ElementsTransitionGenerator : public AllStatic { | 109 class ElementsTransitionGenerator : public AllStatic { |
107 public: | 110 public: |
108 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, | 111 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, |
109 // |allocation_memento_found| may be NULL. | 112 // |allocation_memento_found| may be NULL. |
110 static void GenerateMapChangeElementsTransition( | 113 static void GenerateMapChangeElementsTransition( |
111 MacroAssembler* masm, | 114 MacroAssembler* masm, |
112 Register receiver, | 115 Register receiver, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #ifdef V8_TARGET_ARCH_ARM64 | 166 #ifdef V8_TARGET_ARCH_ARM64 |
164 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; | 167 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; |
165 #endif | 168 #endif |
166 #endif | 169 #endif |
167 }; | 170 }; |
168 | 171 |
169 } // namespace internal | 172 } // namespace internal |
170 } // namespace v8 | 173 } // namespace v8 |
171 | 174 |
172 #endif // V8_CODEGEN_H_ | 175 #endif // V8_CODEGEN_H_ |
OLD | NEW |