Floats Class Reference

#include <floats.hpp>

Inheritance diagram for Floats:

Inheritance graph
[legend]
Collaboration diagram for Floats:

Collaboration graph
[legend]
List of all members.

Public Types

 magic = 0xbadbabe0
 max_number_of_functions = 256
 zero
 one
 abs
 negated
 squared
 sqrt
 sin
 cos
 tan
 exp
 ln
 add
 subtract
 multiply
 divide
 modulo
 is_zero
 is_not_zero
 oopify
 is_equal
 is_not_equal
 is_less
 is_less_equal
 is_greater
 is_greater_equal
 number_of_functions
 undefined
 floatify
enum  Some_constants { magic = 0xbadbabe0, max_number_of_functions = 256 }
enum  Function {
  zero, one, abs, negated,
  squared, sqrt, sin, cos,
  tan, exp, ln, add,
  subtract, multiply, divide, modulo,
  is_zero, is_not_zero, oopify, is_equal,
  is_not_equal, is_less, is_less_equal, is_greater,
  is_greater_equal, number_of_functions, undefined, floatify
}

Static Public Member Functions

static char * function_name_for (Function f)
static bool has_selector_for (Function f)
static symbolOop selector_for (Function f)
static oop magic_value ()
static bool is_initialized ()
static void init (MacroAssembler *masm)
static void print ()

Static Public Attributes

static char * _function_table [max_number_of_functions]

Static Private Member Functions

static void generate_tst (MacroAssembler *masm, Assembler::Condition cc)
static void generate_cmp (MacroAssembler *masm, Assembler::Condition cc)
static void generate (MacroAssembler *masm, Function f)

Static Private Attributes

static bool _is_initialized = false
static char * _function_names []

Detailed Description

Definition at line 28 of file floats.hpp.


Member Enumeration Documentation

enum Floats::Function

Enumerator:
zero 
one 
abs 
negated 
squared 
sqrt 
sin 
cos 
tan 
exp 
ln 
add 
subtract 
multiply 
divide 
modulo 
is_zero 
is_not_zero 
oopify 
is_equal 
is_not_equal 
is_less 
is_less_equal 
is_greater 
is_greater_equal 
number_of_functions 
undefined 
floatify 

Definition at line 39 of file floats.hpp.

enum Floats::Some_constants

Enumerator:
magic 
max_number_of_functions 

Definition at line 30 of file floats.hpp.


Member Function Documentation

char * Floats::function_name_for ( Function  f  )  [static]

Definition at line 38 of file floats.cpp.

References _function_names, assert, and number_of_functions.

Referenced by generate(), generate_float_function_constant_method(), and print().

void Floats::generate ( MacroAssembler masm,
Function  f 
) [static, private]

Definition at line 119 of file floats.cpp.

References _function_table, abs, add, Assembler::code(), cos, outputStream::cr(), divide, Assembler::equal, exp, Assembler::fabs(), Assembler::faddp(), Assembler::fchs(), Assembler::fdivp(), Assembler::fld1(), Assembler::fldz(), Assembler::fmul(), Assembler::fmulp(), Assembler::fprem(), Assembler::fsubp(), function_name_for(), Assembler::fxch(), generate_cmp(), generate_tst(), Assembler::greater, Assembler::greaterEqual, Assembler::hlt(), Assembler::int3(), is_equal, is_greater, is_greater_equal, is_less, is_less_equal, is_not_equal, is_not_zero, Disclaimer::is_product(), is_zero, Assembler::less, Assembler::lessEqual, ln, modulo, multiply, negated, Assembler::notEqual, Assembler::notZero, one, oopify, Assembler::pc(), outputStream::print(), Assembler::ret(), ShouldNotReachHere, sin, sqrt, squared, std, subtract, tan, Assembler::zero, and zero.

Referenced by init().

Here is the call graph for this function:

void Floats::generate_cmp ( MacroAssembler masm,
Assembler::Condition  cc 
) [static, private]

Definition at line 103 of file floats.cpp.

References Assembler::bind(), eax, falseObj, Assembler::fcompp(), Assembler::fnstsw_ax(), MacroAssembler::fpu_mask_and_cond_for(), Assembler::fwait(), Assembler::jcc(), L, Assembler::movl(), Assembler::testl(), and trueObj.

Referenced by generate().

Here is the call graph for this function:

void Floats::generate_tst ( MacroAssembler masm,
Assembler::Condition  cc 
) [static, private]

Definition at line 85 of file floats.cpp.

References Assembler::bind(), eax, falseObj, Assembler::fnstsw_ax(), MacroAssembler::fpop(), MacroAssembler::fpu_mask_and_cond_for(), Assembler::ftst(), Assembler::fwait(), Assembler::int3(), Assembler::jcc(), L, Assembler::movl(), Assembler::testl(), and trueObj.

Referenced by generate().

Here is the call graph for this function:

bool Floats::has_selector_for ( Function  f  )  [static]

Definition at line 44 of file floats.cpp.

References one, undefined, and zero.

void Floats::init ( MacroAssembler masm  )  [static]

Definition at line 177 of file floats.cpp.

References _function_names, _function_table, _is_initialized, abs, add, Assembler::code(), cos, outputStream::cr(), divide, exp, fatal, generate(), Assembler::hlt(), is_equal, is_greater, is_greater_equal, is_initialized(), is_less, is_less_equal, is_not_equal, is_not_zero, Disclaimer::is_product(), is_zero, ln, max_number_of_functions, modulo, multiply, negated, number_of_functions, one, oopify, Assembler::pc(), outputStream::print(), sin, sqrt, squared, std, subtract, tan, and zero.

Here is the call graph for this function:

static bool Floats::is_initialized (  )  [inline, static]

Definition at line 108 of file floats.hpp.

References _is_initialized.

Referenced by init().

static oop Floats::magic_value (  )  [inline, static]

Definition at line 105 of file floats.hpp.

References magic.

Referenced by frame::has_compiled_float_marker(), and frame::has_interpreted_float_marker().

void Floats::print (  )  [static]

Definition at line 234 of file floats.cpp.

References _function_table, _is_initialized, outputStream::cr(), function_name_for(), number_of_functions, outputStream::print(), outputStream::print_cr(), and std.

Here is the call graph for this function:

symbolOop Floats::selector_for ( Function  f  )  [static]

Definition at line 52 of file floats.cpp.

References abs, add, cos, divide, exp, floatify, is_equal, is_greater, is_greater_equal, is_less, is_less_equal, is_not_equal, is_not_zero, is_zero, ln, modulo, multiply, negated, oopify, sin, sqrt, squared, subtract, and tan.

Referenced by MethodPrettyPrinter::float_binary(), MethodPrinterClosure::float_binary(), MethodPrettyPrinter::float_binaryToOop(), MethodPrinterClosure::float_binaryToOop(), MethodPrettyPrinter::float_floatify(), MethodPrinterClosure::float_floatify(), MethodPrinterClosure::float_nullary(), SendersClosure::float_op(), MethodPrettyPrinter::float_unary(), MethodPrinterClosure::float_unary(), MethodPrettyPrinter::float_unaryToOop(), and MethodPrinterClosure::float_unaryToOop().


Member Data Documentation

char * Floats::_function_names [static, private]

Initial value:

 {
  "zero", "one",
  "abs", "negated", "squared", "sqrt", "sin", "cos", "tan", "exp", "ln",
  "add", "subtract", "multiply", "divide", "modulo",
  "is_zero", "is_not_zero", "oopify",
  "is_equal", "is_not_equal", "is_less", "is_less_equal", "is_greater", "is_greater_equal"
}

Definition at line 85 of file floats.hpp.

Referenced by function_name_for(), and init().

char * Floats::_function_table [static]

Definition at line 94 of file floats.hpp.

Referenced by generate(), init(), and print().

bool Floats::_is_initialized = false [static, private]

Definition at line 84 of file floats.hpp.

Referenced by init(), is_initialized(), and print().


The documentation for this class was generated from the following files:
Generated on Mon Oct 9 13:57:54 2006 for Strongtalk VM by  doxygen 1.4.7