MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
std.cpp File Reference

Standard library module C++ runtime bindings for the MXVM interpreter. More...

#include "mx_std.h"
#include <mxvm/icode.hpp>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
Include dependency graph for std.cpp:

Go to the source code of this file.

Functions

void mxvm_std_abs (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_fabs (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_sqrt (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_pow (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_sin (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_cos (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_tan (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_floor (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_ceil (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_rand (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_srand (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_malloc (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_calloc (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_release (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_toupper (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_tolower (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_isalpha (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_isdigit (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_isspace (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_atoi (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_atof (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_exit (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_system (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_memcpy (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_memcmp (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_memmove (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_memset (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_exp (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_exp2 (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_log (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_log10 (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_log2 (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_fmod (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_atan2 (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_asin (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_acos (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_atan (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_sinh (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_cosh (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_tanh (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_hypot (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_round (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_trunc (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_argc (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_argv (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_free_program_args (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_set_program_args (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_float_to_int (mxvm::Program *program, std::vector< mxvm::Operand > &operand)
void mxvm_std_int_to_float (mxvm::Program *program, std::vector< mxvm::Operand > &operand)

Detailed Description

Standard library module C++ runtime bindings for the MXVM interpreter.

Author
Jared Bruni

Definition in file std.cpp.

Function Documentation

◆ mxvm_std_abs()

◆ mxvm_std_acos()

◆ mxvm_std_argc()

void mxvm_std_argc ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

Definition at line 760 of file std.cpp.

References argc(), mxvm::VAR_INTEGER, and mxvm::Base::vars.

◆ mxvm_std_argv()

◆ mxvm_std_asin()

◆ mxvm_std_atan()

◆ mxvm_std_atan2()

◆ mxvm_std_atof()

◆ mxvm_std_atoi()

◆ mxvm_std_calloc()

void mxvm_std_calloc ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_ceil()

◆ mxvm_std_cos()

◆ mxvm_std_cosh()

◆ mxvm_std_exit()

void mxvm_std_exit ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_exp()

◆ mxvm_std_exp2()

◆ mxvm_std_fabs()

◆ mxvm_std_float_to_int()

◆ mxvm_std_floor()

◆ mxvm_std_fmod()

◆ mxvm_std_free_program_args()

void mxvm_std_free_program_args ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

Definition at line 792 of file std.cpp.

References free_program_args().

◆ mxvm_std_hypot()

◆ mxvm_std_int_to_float()

◆ mxvm_std_isalpha()

void mxvm_std_isalpha ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_isdigit()

void mxvm_std_isdigit ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_isspace()

void mxvm_std_isspace ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_log()

◆ mxvm_std_log10()

◆ mxvm_std_log2()

◆ mxvm_std_malloc()

void mxvm_std_malloc ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_memcmp()

◆ mxvm_std_memcpy()

◆ mxvm_std_memmove()

◆ mxvm_std_memset()

◆ mxvm_std_pow()

◆ mxvm_std_rand()

void mxvm_std_rand ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

Definition at line 181 of file std.cpp.

References mxvm::VAR_INTEGER, and mxvm::Base::vars.

◆ mxvm_std_release()

◆ mxvm_std_round()

◆ mxvm_std_set_program_args()

◆ mxvm_std_sin()

◆ mxvm_std_sinh()

◆ mxvm_std_sqrt()

◆ mxvm_std_srand()

void mxvm_std_srand ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_system()

◆ mxvm_std_tan()

◆ mxvm_std_tanh()

◆ mxvm_std_tolower()

void mxvm_std_tolower ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_toupper()

void mxvm_std_toupper ( mxvm::Program * program,
std::vector< mxvm::Operand > & operand )

◆ mxvm_std_trunc()