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

Side by Side Diff: src/builtins/builtins-definitions.h

Issue 2803853005: Inline Array.prototype.forEach in TurboFan (Closed)
Patch Set: fix v8heapconst.py Created 3 years, 7 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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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_BUILTINS_BUILTINS_DEFINITIONS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_DEFINITIONS_H_
6 #define V8_BUILTINS_BUILTINS_DEFINITIONS_H_ 6 #define V8_BUILTINS_BUILTINS_DEFINITIONS_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 ASM(InOptimizationQueue) \ 150 ASM(InOptimizationQueue) \
151 ASM(InstantiateAsmJs) \ 151 ASM(InstantiateAsmJs) \
152 ASM(MarkCodeAsToBeExecutedOnce) \ 152 ASM(MarkCodeAsToBeExecutedOnce) \
153 ASM(MarkCodeAsExecutedOnce) \ 153 ASM(MarkCodeAsExecutedOnce) \
154 ASM(MarkCodeAsExecutedTwice) \ 154 ASM(MarkCodeAsExecutedTwice) \
155 ASM(NotifyDeoptimized) \ 155 ASM(NotifyDeoptimized) \
156 ASM(NotifySoftDeoptimized) \ 156 ASM(NotifySoftDeoptimized) \
157 ASM(NotifyLazyDeoptimized) \ 157 ASM(NotifyLazyDeoptimized) \
158 ASM(NotifyStubFailure) \ 158 ASM(NotifyStubFailure) \
159 ASM(NotifyStubFailureSaveDoubles) \ 159 ASM(NotifyStubFailureSaveDoubles) \
160 ASM(NotifyBuiltinContinuation) \
161 \
162 /* Trampolines called when returning from a deoptimization that expects */ \
163 /* to continue in a JavaScript builtin to finish the functionality of a */ \
164 /* an TF-inlined version of builtin that has side-effects. */ \
165 /* Each restores input register values that the builtin expects from a */ \
166 /* BuiltinContinuationFrame, tear down that frame, and then jump to the */ \
167 /* stashed-away builtin's address. After the trampoline completes, */ \
168 /* it appears to the called JavaScript builtin that it had been directly */ \
169 /* invoked by the frame above it. When the builtin returns, execution */ \
170 /* resumes normally in the calling frame, processing any return result */ \
171 /* from the JavaScript builtin, again as if it had called the builtin */ \
172 /* directly. */ \
Jarin 2017/05/24 06:41:22 Nit: This would read better if it was written as a
Michael Starzinger 2017/05/24 13:54:59 +1
danno 2017/06/06 12:04:51 Done.
danno 2017/06/06 12:04:51 Done.
173 /* There are two variants of the stub that differ in their handling of a */ \
174 /* value returned by the next frame deeper on the stack. For LAZY deopts, */ \
175 /* the return value (e.g. rax on x64) is explicitly passed as an extra */ \
176 /* stack parameter to the JavaScript builtin by the "WithResult" */ \
177 /* trampoline variant. The plain variant is used in EAGER deopt contexts */ \
178 /* and has no such special handling. */ \
179 ASM(ContinueToCodeStubBuiltin) \
180 ASM(ContinueToCodeStubBuiltinWithResult) \
181 ASM(ContinueToJavaScriptBuiltin) \
182 ASM(ContinueToJavaScriptBuiltinWithResult) \
183 \
160 ASM(OnStackReplacement) \ 184 ASM(OnStackReplacement) \
161 \ 185 \
162 /* API callback handling */ \ 186 /* API callback handling */ \
163 API(HandleApiCall) \ 187 API(HandleApiCall) \
164 API(HandleApiCallAsFunction) \ 188 API(HandleApiCallAsFunction) \
165 API(HandleApiCallAsConstructor) \ 189 API(HandleApiCallAsConstructor) \
166 \ 190 \
167 /* Adapters for Turbofan into runtime */ \ 191 /* Adapters for Turbofan into runtime */ \
168 ASM(AllocateInNewSpace) \ 192 ASM(AllocateInNewSpace) \
169 ASM(AllocateInOldSpace) \ 193 ASM(AllocateInOldSpace) \
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 TFJ(FastArrayShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 285 TFJ(FastArrayShift, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
262 /* ES6 #sec-array.prototype.slice */ \ 286 /* ES6 #sec-array.prototype.slice */ \
263 CPP(ArraySlice) \ 287 CPP(ArraySlice) \
264 /* ES6 #sec-array.prototype.splice */ \ 288 /* ES6 #sec-array.prototype.splice */ \
265 CPP(ArraySplice) \ 289 CPP(ArraySplice) \
266 /* ES6 #sec-array.prototype.unshift */ \ 290 /* ES6 #sec-array.prototype.unshift */ \
267 CPP(ArrayUnshift) \ 291 CPP(ArrayUnshift) \
268 /* ES6 #sec-array.prototype.foreach */ \ 292 /* ES6 #sec-array.prototype.foreach */ \
269 TFS(ArrayForEachLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 293 TFS(ArrayForEachLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
270 kObject, kInitialK, kLength, kTo) \ 294 kObject, kInitialK, kLength, kTo) \
295 TFJ(ArrayForEachLoopEagerDeoptContinuation, 4, kCallbackFn, kThisArg, \
296 kInitialK, kLength) \
297 TFJ(ArrayForEachLoopLazyDeoptContinuation, 5, kCallbackFn, kThisArg, \
298 kInitialK, kLength, kResult) \
271 TFJ(ArrayForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 299 TFJ(ArrayForEach, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
272 /* ES6 #sec-array.prototype.every */ \ 300 /* ES6 #sec-array.prototype.every */ \
273 TFS(ArrayEveryLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 301 TFS(ArrayEveryLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
274 kObject, kInitialK, kLength, kTo) \ 302 kObject, kInitialK, kLength, kTo) \
275 TFJ(ArrayEvery, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 303 TFJ(ArrayEvery, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
276 /* ES6 #sec-array.prototype.some */ \ 304 /* ES6 #sec-array.prototype.some */ \
277 TFS(ArraySomeLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \ 305 TFS(ArraySomeLoopContinuation, kReceiver, kCallbackFn, kThisArg, kArray, \
278 kObject, kInitialK, kLength, kTo) \ 306 kObject, kInitialK, kLength, kTo) \
279 TFJ(ArraySome, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ 307 TFJ(ArraySome, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \
280 /* ES6 #sec-array.prototype.filter */ \ 308 /* ES6 #sec-array.prototype.filter */ \
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 IGNORE_BUILTIN, IGNORE_BUILTIN, V, V) 1079 IGNORE_BUILTIN, IGNORE_BUILTIN, V, V)
1052 1080
1053 #define BUILTIN_LIST_DBG(V) \ 1081 #define BUILTIN_LIST_DBG(V) \
1054 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 1082 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
1055 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V) 1083 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V)
1056 1084
1057 #define BUILTIN_LIST_TFS(V) \ 1085 #define BUILTIN_LIST_TFS(V) \
1058 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 1086 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
1059 V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) 1087 V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
1060 1088
1089 #define BUILTIN_LIST_TFJ(V) \
1090 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, V, IGNORE_BUILTIN, \
1091 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
1092
1093 #define BUILTIN_LIST_TFC(V) \
1094 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \
1095 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
1096
1061 #define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy) 1097 #define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy)
1062 1098
1063 } // namespace internal 1099 } // namespace internal
1064 } // namespace v8 1100 } // namespace v8
1065 1101
1066 #endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_ 1102 #endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698