1 // Copyright 2016 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_BUILTINS_BUILTINS_PROMISE_GEN_H_ 6 #define V8_BUILTINS_BUILTINS_PROMISE_GEN_H_ 7 8 #include "src/codegen/code-stub-assembler.h" 9 #include "src/objects/promise.h" 10 11 namespace v8 { 12 namespace internal { 13 14 using CodeAssemblerState = compiler::CodeAssemblerState; 15 16 class V8_EXPORT_PRIVATE PromiseBuiltinsAssembler : public CodeStubAssembler { 17 public: PromiseBuiltinsAssembler(compiler::CodeAssemblerState * state)18 explicit PromiseBuiltinsAssembler(compiler::CodeAssemblerState* state) 19 : CodeStubAssembler(state) {} 20 void ZeroOutEmbedderOffsets(TNode<JSPromise> promise); 21 22 TNode<HeapObject> AllocateJSPromise(TNode<Context> context); 23 }; 24 25 } // namespace internal 26 } // namespace v8 27 28 #endif // V8_BUILTINS_BUILTINS_PROMISE_GEN_H_ 29