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); | |
97 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); | 96 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); |
98 | 97 |
99 | 98 |
100 double modulo(double x, double y); | 99 double modulo(double x, double y); |
101 | 100 |
102 // Custom implementation of math functions. | 101 // Custom implementation of math functions. |
103 double fast_exp(double input, Isolate* isolate); | |
104 double fast_sqrt(double input, Isolate* isolate); | 102 double fast_sqrt(double input, Isolate* isolate); |
105 void lazily_initialize_fast_exp(Isolate* isolate); | |
106 void lazily_initialize_fast_sqrt(Isolate* isolate); | 103 void lazily_initialize_fast_sqrt(Isolate* isolate); |
107 | 104 |
108 | 105 |
109 class ElementsTransitionGenerator : public AllStatic { | 106 class ElementsTransitionGenerator : public AllStatic { |
110 public: | 107 public: |
111 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, | 108 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, |
112 // |allocation_memento_found| may be NULL. | 109 // |allocation_memento_found| may be NULL. |
113 static void GenerateMapChangeElementsTransition( | 110 static void GenerateMapChangeElementsTransition( |
114 MacroAssembler* masm, | 111 MacroAssembler* masm, |
115 Register receiver, | 112 Register receiver, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 #ifdef V8_TARGET_ARCH_ARM64 | 163 #ifdef V8_TARGET_ARCH_ARM64 |
167 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; | 164 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; |
168 #endif | 165 #endif |
169 #endif | 166 #endif |
170 }; | 167 }; |
171 | 168 |
172 } // namespace internal | 169 } // namespace internal |
173 } // namespace v8 | 170 } // namespace v8 |
174 | 171 |
175 #endif // V8_CODEGEN_H_ | 172 #endif // V8_CODEGEN_H_ |
OLD | NEW |