Navigation Menu

Skip to content

Commit

Permalink
All methods in the representation API should get PARROT_INTERP.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 15, 2010
1 parent a7e45c1 commit 5ed61d6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions parrot/src/metamodel/repr.h
Expand Up @@ -10,56 +10,56 @@ typedef struct {
/* Creates a new type object of this representation, and
* associates it with the given HOW. Also sets up a new
* representation instance if needed. */
PMC * (*type_object_for) (PMC *self, PMC *HOW);
PMC * (*type_object_for) (PARROT_INTERP, PMC *self, PMC *HOW);

/* Creates a new instance based on the type object. */
PMC * (*instance_of) (PMC *self, PMC *WHAT);
PMC * (*instance_of) (PARROT_INTERP, PMC *self, PMC *WHAT);

/* Checks if a given object is defined (from the point of
* view of the representation). */
INTVAL (*defined) (PMC *self, PMC *Obj);
INTVAL (*defined) (PARROT_INTERP, PMC *self, PMC *Obj);

/* Gets the current value for an attribute. */
PMC * (*get_attribute) (PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name);
PMC * (*get_attribute) (PARROT_INTERP, PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name);

/* Gets the current value for an attribute, obtained using the
* given hint.*/
PMC * (*get_attribute_with_hint) (PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, INTVAL Hint);
PMC * (*get_attribute_with_hint) (PARROT_INTERP, PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, INTVAL Hint);

/* Binds the given value to the specified attribute. */
void (*bind_attribute) (PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, PMC *Value);
void (*bind_attribute) (PARROT_INTERP, PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, PMC *Value);

/* Binds the given value to the specified attribute, using the
* given hint. */
void (*bind_attribute_with_hint) (PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, INTVAL Hint, PMC *Value);
void (*bind_attribute_with_hint) (PARROT_INTERP, PMC *self, PMC *Object, PMC *ClassHandle, STRING *Name, INTVAL Hint, PMC *Value);

/* Gets the hint for the given attribute ID. */
INTVAL (*hint_for) (PMC *self, PMC *ClassHandle, STRING *Name);
INTVAL (*hint_for) (PARROT_INTERP, PMC *self, PMC *ClassHandle, STRING *Name);

/* Used with boxing. Sets an integer value, for representations that
* can hold one. */
void (*set_int) (PMC *self, PMC *Object, INTVAL Value);
void (*set_int) (PARROT_INTERP, PMC *self, PMC *Object, INTVAL Value);

/* Used with boxing. Gets an integer value, for representations that
* can hold one. */
INTVAL (*get_int) (PMC *self, PMC *Object);
INTVAL (*get_int) (PARROT_INTERP, PMC *self, PMC *Object);

/* Used with boxing. Sets a floating point value, for representations that
* can hold one. */
void (*set_num) (PMC *self, PMC *Object, FLOATVAL Value);
void (*set_num) (PARROT_INTERP, PMC *self, PMC *Object, FLOATVAL Value);

/* Used with boxing. Gets a floating point value, for representations that
* can hold one. */
FLOATVAL (*get_num) (PMC *self, PMC *Object);
FLOATVAL (*get_num) (PARROT_INTERP, PMC *self, PMC *Object);

/* Used with boxing. Sets a string value, for representations that
* can hold one. */
void (*set_str) (PMC *self, PMC *Object, STRING *Value);
void (*set_str) (PARROT_INTERP, PMC *self, PMC *Object, STRING *Value);

/* Used with boxing. Gets a string value, for representations that
* can hold one. */
STRING * (*get_str) (PMC *self, PMC *Object);
STRING * (*get_str) (PARROT_INTERP, PMC *self, PMC *Object);

/* This Parrot-specific addition to the API is used to mark an object. */
void * (*gc_mark) (PMC *self, PMC *Object);
void * (*gc_mark) (PARROT_INTERP, PMC *self, PMC *Object);
} Rakudo_Metamodel_Representation;

0 comments on commit 5ed61d6

Please sign in to comment.