| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 static void PrintCode(Handle<Code> code, CompilationInfo* info); | 82 static void PrintCode(Handle<Code> code, CompilationInfo* info); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 85 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 | 88 |
| 89 // Results of the library implementation of transcendental functions may differ | 89 // Results of the library implementation of transcendental functions may differ |
| 90 // from the one we use in our generated code. Therefore we use the same | 90 // from the one we use in our generated code. Therefore we use the same |
| 91 // generated code both in runtime and compiled code. | 91 // generated code both in runtime and compiled code. |
| 92 typedef double (*UnaryMathFunction)(double x); | |
| 93 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); | 92 typedef double (*UnaryMathFunctionWithIsolate)(double x, Isolate* isolate); |
| 94 | 93 |
| 95 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate); | 94 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate); |
| 96 UnaryMathFunction CreateSqrtFunction(); | 95 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate); |
| 97 | 96 |
| 98 | 97 |
| 99 double modulo(double x, double y); | 98 double modulo(double x, double y); |
| 100 | 99 |
| 101 // Custom implementation of math functions. | 100 // Custom implementation of math functions. |
| 102 double fast_exp(double input, Isolate* isolate); | 101 double fast_exp(double input, Isolate* isolate); |
| 103 double fast_sqrt(double input); | 102 double fast_sqrt(double input, Isolate* isolate); |
| 104 #ifdef _WIN64 | 103 #ifdef _WIN64 |
| 105 void init_modulo_function(); | 104 void init_modulo_function(); |
| 106 #endif | 105 #endif |
| 107 void lazily_initialize_fast_exp(Isolate* isolate); | 106 void lazily_initialize_fast_exp(Isolate* isolate); |
| 108 void init_fast_sqrt_function(); | 107 void lazily_initialize_fast_sqrt(Isolate* isolate); |
| 109 | 108 |
| 110 | 109 |
| 111 class ElementsTransitionGenerator : public AllStatic { | 110 class ElementsTransitionGenerator : public AllStatic { |
| 112 public: | 111 public: |
| 113 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, | 112 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, |
| 114 // |allocation_memento_found| may be NULL. | 113 // |allocation_memento_found| may be NULL. |
| 115 static void GenerateMapChangeElementsTransition( | 114 static void GenerateMapChangeElementsTransition( |
| 116 MacroAssembler* masm, | 115 MacroAssembler* masm, |
| 117 Register receiver, | 116 Register receiver, |
| 118 Register key, | 117 Register key, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 #ifdef V8_TARGET_ARCH_ARM64 | 167 #ifdef V8_TARGET_ARCH_ARM64 |
| 169 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; | 168 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; |
| 170 #endif | 169 #endif |
| 171 #endif | 170 #endif |
| 172 }; | 171 }; |
| 173 | 172 |
| 174 } // namespace internal | 173 } // namespace internal |
| 175 } // namespace v8 | 174 } // namespace v8 |
| 176 | 175 |
| 177 #endif // V8_CODEGEN_H_ | 176 #endif // V8_CODEGEN_H_ |
| OLD | NEW |