#include "core/fpdfapi/page/cpdf_psengine.h"
#include <math.h>
#include <algorithm>
#include <limits>
#include <utility>
#include "core/fpdfapi/parser/cpdf_simple_parser.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/notreached.h"
namespace {
struct PDF_PSOpName { … };
constexpr PDF_PSOpName kPsOpNames[] = …;
float RoundHalfUp(float f) { … }
}
CPDF_PSOP::CPDF_PSOP()
: … { … }
CPDF_PSOP::CPDF_PSOP(PDF_PSOP op) : … { … }
CPDF_PSOP::CPDF_PSOP(float value) : … { … }
CPDF_PSOP::~CPDF_PSOP() = default;
bool CPDF_PSOP::Parse(CPDF_SimpleParser* parser, int depth) { … }
void CPDF_PSOP::Execute(CPDF_PSEngine* pEngine) { … }
float CPDF_PSOP::GetFloatValue() const { … }
bool CPDF_PSEngine::Execute() { … }
CPDF_PSProc::CPDF_PSProc() = default;
CPDF_PSProc::~CPDF_PSProc() = default;
bool CPDF_PSProc::Parse(CPDF_SimpleParser* parser, int depth) { … }
bool CPDF_PSProc::Execute(CPDF_PSEngine* pEngine) { … }
void CPDF_PSProc::AddOperatorForTesting(ByteStringView word) { … }
void CPDF_PSProc::AddOperator(ByteStringView word) { … }
CPDF_PSEngine::CPDF_PSEngine() = default;
CPDF_PSEngine::~CPDF_PSEngine() = default;
void CPDF_PSEngine::Push(float v) { … }
float CPDF_PSEngine::Pop() { … }
int CPDF_PSEngine::PopInt() { … }
bool CPDF_PSEngine::Parse(pdfium::span<const uint8_t> input) { … }
bool CPDF_PSEngine::DoOperator(PDF_PSOP op) { … }