| 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_CODE_FACTORY_H_ | 5 #ifndef V8_CODE_FACTORY_H_ |
| 6 #define V8_CODE_FACTORY_H_ | 6 #define V8_CODE_FACTORY_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 const Handle<Code> code_; | 27 const Handle<Code> code_; |
| 28 const CallInterfaceDescriptor descriptor_; | 28 const CallInterfaceDescriptor descriptor_; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 | 31 |
| 32 class CodeFactory final { | 32 class CodeFactory final { |
| 33 public: | 33 public: |
| 34 // Initial states for ICs. | 34 // Initial states for ICs. |
| 35 static Callable LoadIC(Isolate* isolate, TypeofMode typeof_mode, | 35 static Callable LoadIC(Isolate* isolate, TypeofMode typeof_mode); |
| 36 LanguageMode language_mode); | |
| 37 static Callable LoadICInOptimizedCode(Isolate* isolate, | 36 static Callable LoadICInOptimizedCode(Isolate* isolate, |
| 38 TypeofMode typeof_mode, | 37 TypeofMode typeof_mode, |
| 39 LanguageMode language_mode, | |
| 40 InlineCacheState initialization_state); | 38 InlineCacheState initialization_state); |
| 41 static Callable KeyedLoadIC(Isolate* isolate, LanguageMode language_mode); | 39 static Callable KeyedLoadIC(Isolate* isolate); |
| 42 static Callable KeyedLoadICInOptimizedCode( | 40 static Callable KeyedLoadICInOptimizedCode( |
| 43 Isolate* isolate, LanguageMode language_mode, | 41 Isolate* isolate, InlineCacheState initialization_state); |
| 44 InlineCacheState initialization_state); | |
| 45 static Callable CallIC(Isolate* isolate, int argc, | 42 static Callable CallIC(Isolate* isolate, int argc, |
| 46 ConvertReceiverMode mode = ConvertReceiverMode::kAny, | 43 ConvertReceiverMode mode = ConvertReceiverMode::kAny, |
| 47 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 44 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 48 static Callable CallICInOptimizedCode( | 45 static Callable CallICInOptimizedCode( |
| 49 Isolate* isolate, int argc, | 46 Isolate* isolate, int argc, |
| 50 ConvertReceiverMode mode = ConvertReceiverMode::kAny, | 47 ConvertReceiverMode mode = ConvertReceiverMode::kAny, |
| 51 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 48 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 52 static Callable StoreIC(Isolate* isolate, LanguageMode mode); | 49 static Callable StoreIC(Isolate* isolate, LanguageMode mode); |
| 53 static Callable StoreICInOptimizedCode(Isolate* isolate, LanguageMode mode, | 50 static Callable StoreICInOptimizedCode(Isolate* isolate, LanguageMode mode, |
| 54 InlineCacheState initialization_state); | 51 InlineCacheState initialization_state); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 107 |
| 111 static Callable InterpreterPushArgsAndCall(Isolate* isolate); | 108 static Callable InterpreterPushArgsAndCall(Isolate* isolate); |
| 112 static Callable InterpreterPushArgsAndConstruct(Isolate* isolate); | 109 static Callable InterpreterPushArgsAndConstruct(Isolate* isolate); |
| 113 static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1); | 110 static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1); |
| 114 }; | 111 }; |
| 115 | 112 |
| 116 } // namespace internal | 113 } // namespace internal |
| 117 } // namespace v8 | 114 } // namespace v8 |
| 118 | 115 |
| 119 #endif // V8_CODE_FACTORY_H_ | 116 #endif // V8_CODE_FACTORY_H_ |
| OLD | NEW |