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/globals.h" |
9 #include "src/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
10 | 11 |
11 // Include the declaration of the architecture defined class CodeGenerator. | 12 // Include the declaration of the architecture defined class CodeGenerator. |
12 // The contract to the shared code is that the the CodeGenerator is a subclass | 13 // The contract to the shared code is that the the CodeGenerator is a subclass |
13 // of Visitor and that the following methods are available publicly: | 14 // of Visitor and that the following methods are available publicly: |
14 // MakeCode | 15 // MakeCode |
15 // MakeCodePrologue | 16 // MakeCodePrologue |
16 // MakeCodeEpilogue | 17 // MakeCodeEpilogue |
17 // masm | 18 // masm |
18 // frame | 19 // frame |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 }; | 91 }; |
91 | 92 |
92 | 93 |
93 // Results of the library implementation of transcendental functions may differ | 94 // Results of the library implementation of transcendental functions may differ |
94 // from the one we use in our generated code. Therefore we use the same | 95 // from the one we use in our generated code. Therefore we use the same |
95 // generated code both in runtime and compiled code. | 96 // generated code both in runtime and compiled code. |
96 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); | 97 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); |
97 | 98 |
98 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); | 99 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); |
99 | 100 |
100 | 101 V8_EXPORT_PRIVATE double modulo(double x, double y); |
101 double modulo(double x, double y); | |
102 | 102 |
103 // Custom implementation of math functions. | 103 // Custom implementation of math functions. |
104 double fast_sqrt(double input, Isolate* isolate); | 104 double fast_sqrt(double input, Isolate* isolate); |
105 void lazily_initialize_fast_sqrt(Isolate* isolate); | 105 void lazily_initialize_fast_sqrt(Isolate* isolate); |
106 | 106 |
107 | 107 |
108 class ElementsTransitionGenerator : public AllStatic { | 108 class ElementsTransitionGenerator : public AllStatic { |
109 public: | 109 public: |
110 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, | 110 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, |
111 // |allocation_memento_found| may be NULL. | 111 // |allocation_memento_found| may be NULL. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 #ifdef V8_TARGET_ARCH_ARM64 | 165 #ifdef V8_TARGET_ARCH_ARM64 |
166 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; | 166 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; |
167 #endif | 167 #endif |
168 #endif | 168 #endif |
169 }; | 169 }; |
170 | 170 |
171 } // namespace internal | 171 } // namespace internal |
172 } // namespace v8 | 172 } // namespace v8 |
173 | 173 |
174 #endif // V8_CODEGEN_H_ | 174 #endif // V8_CODEGEN_H_ |
OLD | NEW |