2019-10-04 17:16:12 -07:00
|
|
|
/*
|
2021-12-30 15:06:42 -08:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2019-10-04 17:16:12 -07:00
|
|
|
*
|
2019-10-15 12:33:16 -07:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2019-10-04 17:16:12 -07:00
|
|
|
*/
|
2019-10-15 12:33:16 -07:00
|
|
|
|
2024-01-25 10:10:59 -08:00
|
|
|
#include "hermes/InternalJavaScript/InternalBytecode.h"
|
2020-10-22 18:47:14 -07:00
|
|
|
#include "hermes/BCGen/HBC/BytecodeFileFormat.h"
|
2019-10-04 17:16:12 -07:00
|
|
|
|
|
|
|
|
namespace hermes {
|
|
|
|
|
namespace vm {
|
|
|
|
|
|
2020-07-01 04:33:59 -07:00
|
|
|
llvh::ArrayRef<uint8_t> getInternalBytecode() {
|
2020-10-22 18:47:14 -07:00
|
|
|
// Bytecode is required to be aligned, so ensure we don't fail to load it
|
|
|
|
|
// at runtime.
|
|
|
|
|
alignas(hbc::BYTECODE_ALIGNMENT) static const uint8_t InternalBytecode[] = {
|
2019-10-04 17:16:12 -07:00
|
|
|
#include "InternalBytecode.inc"
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-01 04:33:59 -07:00
|
|
|
return llvh::makeArrayRef(InternalBytecode, sizeof(InternalBytecode));
|
2019-10-04 17:16:12 -07:00
|
|
|
}
|
|
|
|
|
} // namespace vm
|
|
|
|
|
} // namespace hermes
|