Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: src/code-factory.h

Issue 2638393002: [builtins] Add String.prototype.indexOf fast path in TF (Closed)
Patch Set: update comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 static Callable CompareIC(Isolate* isolate, Token::Value op); 63 static Callable CompareIC(Isolate* isolate, Token::Value op);
64 static Callable CompareNilIC(Isolate* isolate, NilValue nil_value); 64 static Callable CompareNilIC(Isolate* isolate, NilValue nil_value);
65 65
66 static Callable BinaryOpIC(Isolate* isolate, Token::Value op); 66 static Callable BinaryOpIC(Isolate* isolate, Token::Value op);
67 67
68 static Callable ApiGetter(Isolate* isolate); 68 static Callable ApiGetter(Isolate* isolate);
69 69
70 // Code stubs. Add methods here as needed to reduce dependency on 70 // Code stubs. Add methods here as needed to reduce dependency on
71 // code-stubs.h. 71 // code-stubs.h.
72 static Callable InstanceOf(Isolate* isolate);
73 static Callable OrdinaryHasInstance(Isolate* isolate);
74
75 static Callable StringFromCharCode(Isolate* isolate);
76
77 static Callable GetProperty(Isolate* isolate);
78
79 static Callable ToBoolean(Isolate* isolate);
80
81 static Callable ToNumber(Isolate* isolate);
82 static Callable NonNumberToNumber(Isolate* isolate);
83 static Callable StringToNumber(Isolate* isolate);
84 static Callable ToString(Isolate* isolate);
85 static Callable ToName(Isolate* isolate);
86 static Callable ToInteger(Isolate* isolate);
87 static Callable ToLength(Isolate* isolate);
88 static Callable ToObject(Isolate* isolate);
89 static Callable NonPrimitiveToPrimitive(
90 Isolate* isolate, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
91 static Callable OrdinaryToPrimitive(Isolate* isolate,
92 OrdinaryToPrimitiveHint hint);
93 static Callable NumberToString(Isolate* isolate);
94
95 static Callable RegExpExec(Isolate* isolate);
96
97 static Callable Add(Isolate* isolate); 72 static Callable Add(Isolate* isolate);
98 static Callable Subtract(Isolate* isolate); 73 static Callable AllocateHeapNumber(Isolate* isolate);
99 static Callable Multiply(Isolate* isolate); 74 static Callable ArgumentAdaptor(Isolate* isolate);
100 static Callable Divide(Isolate* isolate); 75 static Callable ArrayPush(Isolate* isolate);
101 static Callable Modulus(Isolate* isolate);
102 static Callable ShiftRight(Isolate* isolate);
103 static Callable ShiftRightLogical(Isolate* isolate);
104 static Callable ShiftLeft(Isolate* isolate);
105 static Callable BitwiseAnd(Isolate* isolate); 76 static Callable BitwiseAnd(Isolate* isolate);
106 static Callable BitwiseOr(Isolate* isolate); 77 static Callable BitwiseOr(Isolate* isolate);
107 static Callable BitwiseXor(Isolate* isolate); 78 static Callable BitwiseXor(Isolate* isolate);
108 static Callable LessThan(Isolate* isolate); 79 static Callable CallFunction(
109 static Callable LessThanOrEqual(Isolate* isolate); 80 Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny);
110 static Callable GreaterThan(Isolate* isolate); 81 static Callable Call(Isolate* isolate,
111 static Callable GreaterThanOrEqual(Isolate* isolate); 82 ConvertReceiverMode mode = ConvertReceiverMode::kAny,
83 TailCallMode tail_call_mode = TailCallMode::kDisallow);
84 static Callable ConstructFunction(Isolate* isolate);
85 static Callable Construct(Isolate* isolate);
86 static Callable CopyFastSmiOrObjectElements(Isolate* isolate);
87 static Callable CreateIterResultObject(Isolate* isolate);
88 static Callable Divide(Isolate* isolate);
112 static Callable Equal(Isolate* isolate); 89 static Callable Equal(Isolate* isolate);
113 static Callable NotEqual(Isolate* isolate);
114 static Callable StrictEqual(Isolate* isolate);
115 static Callable StrictNotEqual(Isolate* isolate);
116
117 static Callable StringAdd(Isolate* isolate, StringAddFlags flags,
118 PretenureFlag pretenure_flag);
119 static Callable StringCharAt(Isolate* isolate);
120 static Callable StringCharCodeAt(Isolate* isolate);
121 static Callable StringCompare(Isolate* isolate, Token::Value token);
122 static Callable StringEqual(Isolate* isolate);
123 static Callable StringNotEqual(Isolate* isolate);
124 static Callable StringLessThan(Isolate* isolate);
125 static Callable StringLessThanOrEqual(Isolate* isolate);
126 static Callable StringGreaterThan(Isolate* isolate);
127 static Callable StringGreaterThanOrEqual(Isolate* isolate);
128 static Callable SubString(Isolate* isolate);
129
130 static Callable Typeof(Isolate* isolate);
131 static Callable GetSuperConstructor(Isolate* isolate);
132
133 static Callable FastCloneRegExp(Isolate* isolate); 90 static Callable FastCloneRegExp(Isolate* isolate);
134 static Callable FastCloneShallowArray(Isolate* isolate, 91 static Callable FastCloneShallowArray(Isolate* isolate,
135 AllocationSiteMode allocation_mode); 92 AllocationSiteMode allocation_mode);
136 static Callable FastCloneShallowObject(Isolate* isolate, int length); 93 static Callable FastCloneShallowObject(Isolate* isolate, int length);
137 94 static Callable FastNewClosure(Isolate* isolate);
138 static Callable FastNewFunctionContext(Isolate* isolate, 95 static Callable FastNewFunctionContext(Isolate* isolate,
139 ScopeType scope_type); 96 ScopeType scope_type);
140 static Callable FastNewClosure(Isolate* isolate);
141 static Callable FastNewObject(Isolate* isolate); 97 static Callable FastNewObject(Isolate* isolate);
142 static Callable FastNewRestParameter(Isolate* isolate, 98 static Callable FastNewRestParameter(Isolate* isolate,
143 bool skip_stub_frame = false); 99 bool skip_stub_frame = false);
144 static Callable FastNewSloppyArguments(Isolate* isolate, 100 static Callable FastNewSloppyArguments(Isolate* isolate,
145 bool skip_stub_frame = false); 101 bool skip_stub_frame = false);
146 static Callable FastNewStrictArguments(Isolate* isolate, 102 static Callable FastNewStrictArguments(Isolate* isolate,
147 bool skip_stub_frame = false); 103 bool skip_stub_frame = false);
148 104 static Callable ForInFilter(Isolate* isolate);
149 static Callable CopyFastSmiOrObjectElements(Isolate* isolate); 105 static Callable FunctionPrototypeBind(Isolate* isolate);
106 static Callable GetProperty(Isolate* isolate);
107 static Callable GetSuperConstructor(Isolate* isolate);
108 static Callable GreaterThan(Isolate* isolate);
109 static Callable GreaterThanOrEqual(Isolate* isolate);
150 static Callable GrowFastDoubleElements(Isolate* isolate); 110 static Callable GrowFastDoubleElements(Isolate* isolate);
151 static Callable GrowFastSmiOrObjectElements(Isolate* isolate); 111 static Callable GrowFastSmiOrObjectElements(Isolate* isolate);
112 static Callable HasProperty(Isolate* isolate);
113 static Callable InstanceOf(Isolate* isolate);
114 static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1);
115 static Callable InterpreterOnStackReplacement(Isolate* isolate);
116 static Callable InterpreterPushArgsAndCall(
117 Isolate* isolate, TailCallMode tail_call_mode,
118 CallableType function_type = CallableType::kAny);
119 static Callable InterpreterPushArgsAndConstructArray(Isolate* isolate);
120 static Callable InterpreterPushArgsAndConstruct(
121 Isolate* isolate, CallableType function_type = CallableType::kAny);
122 static Callable LessThan(Isolate* isolate);
123 static Callable LessThanOrEqual(Isolate* isolate);
124 static Callable Modulus(Isolate* isolate);
125 static Callable Multiply(Isolate* isolate);
126 static Callable NewRestParameterElements(Isolate* isolate);
127 static Callable NewUnmappedArgumentsElements(Isolate* isolate);
128 static Callable NonNumberToNumber(Isolate* isolate);
129 static Callable NonPrimitiveToPrimitive(
130 Isolate* isolate, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
131 static Callable NotEqual(Isolate* isolate);
132 static Callable NumberToString(Isolate* isolate);
133 static Callable OrdinaryHasInstance(Isolate* isolate);
134 static Callable OrdinaryToPrimitive(Isolate* isolate,
135 OrdinaryToPrimitiveHint hint);
136 static Callable PromiseHandleReject(Isolate* isolate);
137 static Callable RegExpExec(Isolate* isolate);
138 static Callable ShiftLeft(Isolate* isolate);
139 static Callable ShiftRight(Isolate* isolate);
140 static Callable ShiftRightLogical(Isolate* isolate);
141 static Callable StrictEqual(Isolate* isolate);
142 static Callable StrictNotEqual(Isolate* isolate);
143 static Callable StringAdd(Isolate* isolate, StringAddFlags flags,
144 PretenureFlag pretenure_flag);
145 static Callable StringCharAt(Isolate* isolate);
146 static Callable StringCharCodeAt(Isolate* isolate);
147 static Callable StringCompare(Isolate* isolate, Token::Value token);
148 static Callable StringEqual(Isolate* isolate);
149 static Callable StringFromCharCode(Isolate* isolate);
150 static Callable StringGreaterThan(Isolate* isolate);
151 static Callable StringGreaterThanOrEqual(Isolate* isolate);
152 static Callable StringIndexOf(Isolate* isolate);
153 static Callable StringLessThan(Isolate* isolate);
154 static Callable StringLessThanOrEqual(Isolate* isolate);
155 static Callable StringNotEqual(Isolate* isolate);
156 static Callable StringToNumber(Isolate* isolate);
157 static Callable SubString(Isolate* isolate);
158 static Callable Subtract(Isolate* isolate);
159 static Callable ToBoolean(Isolate* isolate);
160 static Callable ToInteger(Isolate* isolate);
161 static Callable ToLength(Isolate* isolate);
162 static Callable ToName(Isolate* isolate);
163 static Callable ToNumber(Isolate* isolate);
164 static Callable ToObject(Isolate* isolate);
165 static Callable ToString(Isolate* isolate);
166 static Callable Typeof(Isolate* isolate);
152 167
153 static Callable NewUnmappedArgumentsElements(Isolate* isolate);
154 static Callable NewRestParameterElements(Isolate* isolate);
155
156 static Callable AllocateHeapNumber(Isolate* isolate);
157 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \ 168 #define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
158 static Callable Allocate##Type(Isolate* isolate); 169 static Callable Allocate##Type(Isolate* isolate);
159 SIMD128_TYPES(SIMD128_ALLOC) 170 SIMD128_TYPES(SIMD128_ALLOC)
160 #undef SIMD128_ALLOC 171 #undef SIMD128_ALLOC
161
162 static Callable ArgumentAdaptor(Isolate* isolate);
163 static Callable Call(Isolate* isolate,
164 ConvertReceiverMode mode = ConvertReceiverMode::kAny,
165 TailCallMode tail_call_mode = TailCallMode::kDisallow);
166 static Callable CallFunction(
167 Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny);
168 static Callable Construct(Isolate* isolate);
169 static Callable ConstructFunction(Isolate* isolate);
170 static Callable CreateIterResultObject(Isolate* isolate);
171 static Callable HasProperty(Isolate* isolate);
172 static Callable ForInFilter(Isolate* isolate);
173
174 static Callable InterpreterPushArgsAndCall(
175 Isolate* isolate, TailCallMode tail_call_mode,
176 CallableType function_type = CallableType::kAny);
177 static Callable InterpreterPushArgsAndConstruct(
178 Isolate* isolate, CallableType function_type = CallableType::kAny);
179 static Callable InterpreterPushArgsAndConstructArray(Isolate* isolate);
180 static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1);
181 static Callable InterpreterOnStackReplacement(Isolate* isolate);
182
183 static Callable ArrayPush(Isolate* isolate);
184 static Callable FunctionPrototypeBind(Isolate* isolate);
185 static Callable PromiseHandleReject(Isolate* isolate);
186 }; 172 };
187 173
188 } // namespace internal 174 } // namespace internal
189 } // namespace v8 175 } // namespace v8
190 176
191 #endif // V8_CODE_FACTORY_H_ 177 #endif // V8_CODE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698