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

Unified Diff: src/builtins/builtins-promise.h

Issue 2637523002: [promises] Clean up promise utils and remove dead code (Closed)
Patch Set: Fix nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-promise.h
diff --git a/src/builtins/builtins-promise.h b/src/builtins/builtins-promise.h
index 187a43e97e5fa6674a13d21876a19ee6223da56f..dee9a075a27969a0ff8a5bdb92da61014d24cd3d 100644
--- a/src/builtins/builtins-promise.h
+++ b/src/builtins/builtins-promise.h
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "src/code-stub-assembler.h"
+#include "src/contexts.h"
namespace v8 {
namespace internal {
@@ -13,9 +14,27 @@ typedef compiler::CodeAssemblerState CodeAssemblerState;
class PromiseBuiltinsAssembler : public CodeStubAssembler {
public:
+ enum PromiseResolvingFunctionContextSlot {
+ // Whether the resolve/reject callback was already called.
+ kAlreadyVisitedSlot = Context::MIN_CONTEXT_SLOTS,
+
+ // The promise which resolve/reject callbacks fulfill.
+ kPromiseSlot,
+
+ // Whether to trigger a debug event or not. Used in catch
+ // prediction.
+ kDebugEventSlot,
+ kPromiseContextLength,
+ };
+
+ enum FunctionContextSlot {
+ kCapabilitySlot = Context::MIN_CONTEXT_SLOTS,
+
+ kCapabilitiesContextLength,
+ };
+
explicit PromiseBuiltinsAssembler(CodeAssemblerState* state)
: CodeStubAssembler(state) {}
-
// These allocate and initialize a promise with pending state and
// undefined fields.
//
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698