This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

44 lines
1.0 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#ifndef HERMES_SYNTHTRACEPARSER_H
#define HERMES_SYNTHTRACEPARSER_H
#ifdef HERMESVM_API_TRACE
#include <tuple>
#include "hermes/Public/RuntimeConfig.h"
#include "hermes/SynthTrace.h"
#include "hermes/VM/MockedEnvironment.h"
namespace facebook {
namespace hermes {
namespace tracing {
/// Parse a trace from a JSON string stored in a MemoryBuffer.
std::tuple<
SynthTrace,
::hermes::vm::RuntimeConfig,
::hermes::vm::MockedEnvironment>
parseSynthTrace(std::unique_ptr<llvm::MemoryBuffer> trace);
/// Parse a trace from a JSON string stored in the given file name.
std::tuple<
SynthTrace,
::hermes::vm::RuntimeConfig,
::hermes::vm::MockedEnvironment>
parseSynthTrace(const std::string &tracefile);
} // namespace tracing
} // namespace hermes
} // namespace facebook
#endif // HERMESVM_API_TRACE
#endif // HERMES_SYNTHTRACEPARSER_H