GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Enumerations | Functions | Variables
scm-math.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "charset.h"
#include "cp-abi.h"
#include "target-float.h"
#include "symtab.h"
#include "language.h"
#include "valprint.h"
#include "value.h"
#include "guile-internal.h"

Go to the source code of this file.

Macros

#define STRIP_REFERENCE(TYPE)    ((TYPE->code () == TYPE_CODE_REF) ? ((TYPE)->target_type ()) : (TYPE))
 

Enumerations

enum  valscm_unary_opcode {
  VALSCM_NOT , VALSCM_NEG , VALSCM_NOP , VALSCM_ABS ,
  VALSCM_LOGNOT
}
 
enum  valscm_binary_opcode {
  VALSCM_ADD , VALSCM_SUB , VALSCM_MUL , VALSCM_DIV ,
  VALSCM_REM , VALSCM_MOD , VALSCM_POW , VALSCM_LSH ,
  VALSCM_RSH , VALSCM_MIN , VALSCM_MAX , VALSCM_BITAND ,
  VALSCM_BITOR , VALSCM_BITXOR
}
 

Functions

static SCM vlscm_unop_gdbthrow (enum valscm_unary_opcode opcode, SCM x, const char *func_name)
 
static SCM vlscm_unop (enum valscm_unary_opcode opcode, SCM x, const char *func_name)
 
static SCM vlscm_binop_gdbthrow (enum valscm_binary_opcode opcode, SCM x, SCM y, const char *func_name)
 
static SCM vlscm_binop (enum valscm_binary_opcode opcode, SCM x, SCM y, const char *func_name)
 
static SCM gdbscm_value_add (SCM x, SCM y)
 
static SCM gdbscm_value_sub (SCM x, SCM y)
 
static SCM gdbscm_value_mul (SCM x, SCM y)
 
static SCM gdbscm_value_div (SCM x, SCM y)
 
static SCM gdbscm_value_rem (SCM x, SCM y)
 
static SCM gdbscm_value_mod (SCM x, SCM y)
 
static SCM gdbscm_value_pow (SCM x, SCM y)
 
static SCM gdbscm_value_neg (SCM x)
 
static SCM gdbscm_value_pos (SCM x)
 
static SCM gdbscm_value_abs (SCM x)
 
static SCM gdbscm_value_lsh (SCM x, SCM y)
 
static SCM gdbscm_value_rsh (SCM x, SCM y)
 
static SCM gdbscm_value_min (SCM x, SCM y)
 
static SCM gdbscm_value_max (SCM x, SCM y)
 
static SCM gdbscm_value_not (SCM x)
 
static SCM gdbscm_value_lognot (SCM x)
 
static SCM gdbscm_value_logand (SCM x, SCM y)
 
static SCM gdbscm_value_logior (SCM x, SCM y)
 
static SCM gdbscm_value_logxor (SCM x, SCM y)
 
static SCM vlscm_rich_compare (int op, SCM x, SCM y, const char *func_name)
 
static SCM gdbscm_value_eq_p (SCM x, SCM y)
 
static SCM gdbscm_value_lt_p (SCM x, SCM y)
 
static SCM gdbscm_value_le_p (SCM x, SCM y)
 
static SCM gdbscm_value_gt_p (SCM x, SCM y)
 
static SCM gdbscm_value_ge_p (SCM x, SCM y)
 
static struct valuevlscm_convert_typed_number (const char *func_name, int obj_arg_pos, SCM obj, int type_arg_pos, SCM type_scm, struct type *type, struct gdbarch *gdbarch, SCM *except_scmp)
 
static int vlscm_integer_fits_p (SCM obj, struct type *type)
 
static struct valuevlscm_convert_number (const char *func_name, int obj_arg_pos, SCM obj, struct gdbarch *gdbarch, SCM *except_scmp)
 
static struct valuevlscm_convert_bytevector (SCM bv, struct type *type, SCM type_scm, int arg_pos, const char *func_name, SCM *except_scmp, struct gdbarch *gdbarch)
 
struct valuevlscm_convert_typed_value_from_scheme (const char *func_name, int obj_arg_pos, SCM obj, int type_arg_pos, SCM type_scm, struct type *type, SCM *except_scmp, struct gdbarch *gdbarch, const struct language_defn *language)
 
struct valuevlscm_convert_value_from_scheme (const char *func_name, int obj_arg_pos, SCM obj, SCM *except_scmp, struct gdbarch *gdbarch, const struct language_defn *language)
 
void gdbscm_initialize_math (void)
 

Variables

static const scheme_function math_functions []
 

Macro Definition Documentation

◆ STRIP_REFERENCE

#define STRIP_REFERENCE ( TYPE)     ((TYPE->code () == TYPE_CODE_REF) ? ((TYPE)->target_type ()) : (TYPE))

Definition at line 67 of file scm-math.c.

Referenced by vlscm_binop_gdbthrow().

Enumeration Type Documentation

◆ valscm_binary_opcode

Enumerator
VALSCM_ADD 
VALSCM_SUB 
VALSCM_MUL 
VALSCM_DIV 
VALSCM_REM 
VALSCM_MOD 
VALSCM_POW 
VALSCM_LSH 
VALSCM_RSH 
VALSCM_MIN 
VALSCM_MAX 
VALSCM_BITAND 
VALSCM_BITOR 
VALSCM_BITXOR 

Definition at line 48 of file scm-math.c.

◆ valscm_unary_opcode

Enumerator
VALSCM_NOT 
VALSCM_NEG 
VALSCM_NOP 
VALSCM_ABS 
VALSCM_LOGNOT 

Definition at line 37 of file scm-math.c.

Function Documentation

◆ gdbscm_initialize_math()

void gdbscm_initialize_math ( void )

Definition at line 968 of file scm-math.c.

References gdbscm_define_functions(), and math_functions.

◆ gdbscm_value_abs()

static SCM gdbscm_value_abs ( SCM x)
static

Definition at line 336 of file scm-math.c.

References FUNC_NAME, VALSCM_ABS, and vlscm_unop().

◆ gdbscm_value_add()

static SCM gdbscm_value_add ( SCM x,
SCM y )
static

Definition at line 264 of file scm-math.c.

References FUNC_NAME, VALSCM_ADD, and vlscm_binop().

◆ gdbscm_value_div()

static SCM gdbscm_value_div ( SCM x,
SCM y )
static

Definition at line 288 of file scm-math.c.

References FUNC_NAME, VALSCM_DIV, and vlscm_binop().

◆ gdbscm_value_eq_p()

static SCM gdbscm_value_eq_p ( SCM x,
SCM y )
static

Definition at line 473 of file scm-math.c.

References FUNC_NAME, and vlscm_rich_compare().

◆ gdbscm_value_ge_p()

static SCM gdbscm_value_ge_p ( SCM x,
SCM y )
static

Definition at line 505 of file scm-math.c.

References FUNC_NAME, and vlscm_rich_compare().

◆ gdbscm_value_gt_p()

static SCM gdbscm_value_gt_p ( SCM x,
SCM y )
static

Definition at line 497 of file scm-math.c.

References FUNC_NAME, and vlscm_rich_compare().

◆ gdbscm_value_le_p()

static SCM gdbscm_value_le_p ( SCM x,
SCM y )
static

Definition at line 489 of file scm-math.c.

References FUNC_NAME, and vlscm_rich_compare().

◆ gdbscm_value_logand()

static SCM gdbscm_value_logand ( SCM x,
SCM y )
static

Definition at line 392 of file scm-math.c.

References FUNC_NAME, VALSCM_BITAND, and vlscm_binop().

◆ gdbscm_value_logior()

static SCM gdbscm_value_logior ( SCM x,
SCM y )
static

Definition at line 400 of file scm-math.c.

References FUNC_NAME, VALSCM_BITOR, and vlscm_binop().

◆ gdbscm_value_lognot()

static SCM gdbscm_value_lognot ( SCM x)
static

Definition at line 384 of file scm-math.c.

References FUNC_NAME, VALSCM_LOGNOT, and vlscm_unop().

◆ gdbscm_value_logxor()

static SCM gdbscm_value_logxor ( SCM x,
SCM y )
static

Definition at line 408 of file scm-math.c.

References FUNC_NAME, VALSCM_BITXOR, and vlscm_binop().

◆ gdbscm_value_lsh()

static SCM gdbscm_value_lsh ( SCM x,
SCM y )
static

Definition at line 344 of file scm-math.c.

References FUNC_NAME, VALSCM_LSH, and vlscm_binop().

◆ gdbscm_value_lt_p()

static SCM gdbscm_value_lt_p ( SCM x,
SCM y )
static

Definition at line 481 of file scm-math.c.

References FUNC_NAME, and vlscm_rich_compare().

◆ gdbscm_value_max()

static SCM gdbscm_value_max ( SCM x,
SCM y )
static

Definition at line 368 of file scm-math.c.

References FUNC_NAME, VALSCM_MAX, and vlscm_binop().

◆ gdbscm_value_min()

static SCM gdbscm_value_min ( SCM x,
SCM y )
static

Definition at line 360 of file scm-math.c.

References FUNC_NAME, VALSCM_MIN, and vlscm_binop().

◆ gdbscm_value_mod()

static SCM gdbscm_value_mod ( SCM x,
SCM y )
static

Definition at line 304 of file scm-math.c.

References FUNC_NAME, VALSCM_MOD, and vlscm_binop().

◆ gdbscm_value_mul()

static SCM gdbscm_value_mul ( SCM x,
SCM y )
static

Definition at line 280 of file scm-math.c.

References FUNC_NAME, VALSCM_MUL, and vlscm_binop().

◆ gdbscm_value_neg()

static SCM gdbscm_value_neg ( SCM x)
static

Definition at line 320 of file scm-math.c.

References FUNC_NAME, VALSCM_NEG, and vlscm_unop().

◆ gdbscm_value_not()

static SCM gdbscm_value_not ( SCM x)
static

Definition at line 376 of file scm-math.c.

References FUNC_NAME, VALSCM_NOT, and vlscm_unop().

◆ gdbscm_value_pos()

static SCM gdbscm_value_pos ( SCM x)
static

Definition at line 328 of file scm-math.c.

References FUNC_NAME, VALSCM_NOP, and vlscm_unop().

◆ gdbscm_value_pow()

static SCM gdbscm_value_pow ( SCM x,
SCM y )
static

Definition at line 312 of file scm-math.c.

References FUNC_NAME, VALSCM_POW, and vlscm_binop().

◆ gdbscm_value_rem()

static SCM gdbscm_value_rem ( SCM x,
SCM y )
static

Definition at line 296 of file scm-math.c.

References FUNC_NAME, VALSCM_REM, and vlscm_binop().

◆ gdbscm_value_rsh()

static SCM gdbscm_value_rsh ( SCM x,
SCM y )
static

Definition at line 352 of file scm-math.c.

References FUNC_NAME, VALSCM_RSH, and vlscm_binop().

◆ gdbscm_value_sub()

static SCM gdbscm_value_sub ( SCM x,
SCM y )
static

Definition at line 272 of file scm-math.c.

References FUNC_NAME, VALSCM_SUB, and vlscm_binop().

◆ vlscm_binop()

static SCM vlscm_binop ( enum valscm_binary_opcode opcode,
SCM x,
SCM y,
const char * func_name )
static

◆ vlscm_binop_gdbthrow()

static SCM vlscm_binop_gdbthrow ( enum valscm_binary_opcode opcode,
SCM x,
SCM y,
const char * func_name )
static

◆ vlscm_convert_bytevector()

static struct value * vlscm_convert_bytevector ( SCM bv,
struct type * type,
SCM type_scm,
int arg_pos,
const char * func_name,
SCM * except_scmp,
struct gdbarch * gdbarch )
static

◆ vlscm_convert_number()

static struct value * vlscm_convert_number ( const char * func_name,
int obj_arg_pos,
SCM obj,
struct gdbarch * gdbarch,
SCM * except_scmp )
static

◆ vlscm_convert_typed_number()

static struct value * vlscm_convert_typed_number ( const char * func_name,
int obj_arg_pos,
SCM obj,
int type_arg_pos,
SCM type_scm,
struct type * type,
struct gdbarch * gdbarch,
SCM * except_scmp )
static

◆ vlscm_convert_typed_value_from_scheme()

struct value * vlscm_convert_typed_value_from_scheme ( const char * func_name,
int obj_arg_pos,
SCM obj,
int type_arg_pos,
SCM type_scm,
struct type * type,
SCM * except_scmp,
struct gdbarch * gdbarch,
const struct language_defn * language )

◆ vlscm_convert_value_from_scheme()

struct value * vlscm_convert_value_from_scheme ( const char * func_name,
int obj_arg_pos,
SCM obj,
SCM * except_scmp,
struct gdbarch * gdbarch,
const struct language_defn * language )

◆ vlscm_integer_fits_p()

static int vlscm_integer_fits_p ( SCM obj,
struct type * type )
static

◆ vlscm_rich_compare()

static SCM vlscm_rich_compare ( int op,
SCM x,
SCM y,
const char * func_name )
static

◆ vlscm_unop()

static SCM vlscm_unop ( enum valscm_unary_opcode opcode,
SCM x,
const char * func_name )
static

◆ vlscm_unop_gdbthrow()

static SCM vlscm_unop_gdbthrow ( enum valscm_unary_opcode opcode,
SCM x,
const char * func_name )
static

Variable Documentation

◆ math_functions

const scheme_function math_functions[]
static

Definition at line 866 of file scm-math.c.

Referenced by gdbscm_initialize_math().