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 18 matching lines...) Expand all Loading... |
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, ContextualMode mode); | 35 static Callable LoadIC(Isolate* isolate, ContextualMode mode); |
36 static Callable LoadICInOptimizedCode(Isolate* isolate, ContextualMode mode, | 36 static Callable LoadICInOptimizedCode(Isolate* isolate, ContextualMode mode, |
37 InlineCacheState initialization_state); | 37 InlineCacheState initialization_state); |
38 static Callable KeyedLoadIC(Isolate* isolate); | 38 static Callable KeyedLoadIC(Isolate* isolate); |
39 static Callable KeyedLoadICInOptimizedCode(Isolate* isolate); | 39 static Callable KeyedLoadICInOptimizedCode( |
| 40 Isolate* isolate, InlineCacheState initialization_state); |
40 static Callable CallIC(Isolate* isolate, int argc, | 41 static Callable CallIC(Isolate* isolate, int argc, |
41 CallICState::CallType call_type); | 42 CallICState::CallType call_type); |
42 static Callable CallICInOptimizedCode(Isolate* isolate, int argc, | 43 static Callable CallICInOptimizedCode(Isolate* isolate, int argc, |
43 CallICState::CallType call_type); | 44 CallICState::CallType call_type); |
44 static Callable StoreIC(Isolate* isolate, LanguageMode mode); | 45 static Callable StoreIC(Isolate* isolate, LanguageMode mode); |
45 static Callable KeyedStoreIC(Isolate* isolate, LanguageMode mode); | 46 static Callable KeyedStoreIC(Isolate* isolate, LanguageMode mode); |
| 47 static Callable KeyedStoreICInOptimizedCode( |
| 48 Isolate* isolate, LanguageMode mode, |
| 49 InlineCacheState initialization_state); |
46 | 50 |
47 static Callable CompareIC(Isolate* isolate, Token::Value op); | 51 static Callable CompareIC(Isolate* isolate, Token::Value op); |
48 | 52 |
49 static Callable BinaryOpIC(Isolate* isolate, Token::Value op); | 53 static Callable BinaryOpIC(Isolate* isolate, Token::Value op); |
50 | 54 |
51 // Code stubs. Add methods here as needed to reduce dependency on | 55 // Code stubs. Add methods here as needed to reduce dependency on |
52 // code-stubs.h. | 56 // code-stubs.h. |
53 static Callable ToBoolean( | 57 static Callable ToBoolean( |
54 Isolate* isolate, ToBooleanStub::ResultMode mode, | 58 Isolate* isolate, ToBooleanStub::ResultMode mode, |
55 ToBooleanStub::Types types = ToBooleanStub::Types()); | 59 ToBooleanStub::Types types = ToBooleanStub::Types()); |
56 | 60 |
57 static Callable ToNumber(Isolate* isolate); | 61 static Callable ToNumber(Isolate* isolate); |
58 | 62 |
59 static Callable StringAdd(Isolate* isolate, StringAddFlags flags, | 63 static Callable StringAdd(Isolate* isolate, StringAddFlags flags, |
60 PretenureFlag pretenure_flag); | 64 PretenureFlag pretenure_flag); |
61 | 65 |
62 static Callable AllocateHeapNumber(Isolate* isolate); | 66 static Callable AllocateHeapNumber(Isolate* isolate); |
63 | 67 |
64 static Callable CallFunction(Isolate* isolate, int argc, | 68 static Callable CallFunction(Isolate* isolate, int argc, |
65 CallFunctionFlags flags); | 69 CallFunctionFlags flags); |
66 }; | 70 }; |
67 | 71 |
68 } // namespace internal | 72 } // namespace internal |
69 } // namespace v8 | 73 } // namespace v8 |
70 | 74 |
71 #endif // V8_CODE_FACTORY_H_ | 75 #endif // V8_CODE_FACTORY_H_ |
OLD | NEW |