11cb0ef41Sopenharmony_ci// Copyright 2019 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#ifndef V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_MAC_H_ 61cb0ef41Sopenharmony_ci#define V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_MAC_H_ 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci#include "src/base/macros.h" 91cb0ef41Sopenharmony_ci#include "src/snapshot/embedded/platform-embedded-file-writer-base.h" 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_cinamespace v8 { 121cb0ef41Sopenharmony_cinamespace internal { 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciclass PlatformEmbeddedFileWriterMac : public PlatformEmbeddedFileWriterBase { 151cb0ef41Sopenharmony_ci public: 161cb0ef41Sopenharmony_ci PlatformEmbeddedFileWriterMac(EmbeddedTargetArch target_arch, 171cb0ef41Sopenharmony_ci EmbeddedTargetOs target_os) 181cb0ef41Sopenharmony_ci : target_arch_(target_arch), target_os_(target_os) { 191cb0ef41Sopenharmony_ci USE(target_arch_); 201cb0ef41Sopenharmony_ci USE(target_os_); 211cb0ef41Sopenharmony_ci DCHECK_EQ(target_os_, EmbeddedTargetOs::kMac); 221cb0ef41Sopenharmony_ci } 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ci void SectionText() override; 251cb0ef41Sopenharmony_ci void SectionData() override; 261cb0ef41Sopenharmony_ci void SectionRoData() override; 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci void AlignToCodeAlignment() override; 291cb0ef41Sopenharmony_ci void PaddingAfterCode() override; 301cb0ef41Sopenharmony_ci void AlignToDataAlignment() override; 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci void DeclareUint32(const char* name, uint32_t value) override; 331cb0ef41Sopenharmony_ci void DeclarePointerToSymbol(const char* name, const char* target) override; 341cb0ef41Sopenharmony_ci 351cb0ef41Sopenharmony_ci void DeclareSymbolGlobal(const char* name) override; 361cb0ef41Sopenharmony_ci void DeclareLabel(const char* name) override; 371cb0ef41Sopenharmony_ci 381cb0ef41Sopenharmony_ci void SourceInfo(int fileid, const char* filename, int line) override; 391cb0ef41Sopenharmony_ci void DeclareFunctionBegin(const char* name, uint32_t size) override; 401cb0ef41Sopenharmony_ci void DeclareFunctionEnd(const char* name) override; 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci void Comment(const char* string) override; 431cb0ef41Sopenharmony_ci 441cb0ef41Sopenharmony_ci void FilePrologue() override; 451cb0ef41Sopenharmony_ci void DeclareExternalFilename(int fileid, const char* filename) override; 461cb0ef41Sopenharmony_ci void FileEpilogue() override; 471cb0ef41Sopenharmony_ci 481cb0ef41Sopenharmony_ci int IndentedDataDirective(DataDirective directive) override; 491cb0ef41Sopenharmony_ci 501cb0ef41Sopenharmony_ci private: 511cb0ef41Sopenharmony_ci const EmbeddedTargetArch target_arch_; 521cb0ef41Sopenharmony_ci const EmbeddedTargetOs target_os_; 531cb0ef41Sopenharmony_ci}; 541cb0ef41Sopenharmony_ci 551cb0ef41Sopenharmony_ci} // namespace internal 561cb0ef41Sopenharmony_ci} // namespace v8 571cb0ef41Sopenharmony_ci 581cb0ef41Sopenharmony_ci#endif // V8_SNAPSHOT_EMBEDDED_PLATFORM_EMBEDDED_FILE_WRITER_MAC_H_ 59