CXXR (C++ R)
Namespaces | Functions | Variables
Promise.cpp File Reference

($Id: Promise.cpp 1351 2013-03-08 15:12:28Z arr $)

Implementation of class CXXR::Promise and associated C interface. More...

#include "CXXR/Promise.h"
#include "localization.h"
#include "R_ext/Error.h"
#include "CXXR/Bailout.hpp"
#include "CXXR/GCStackRoot.hpp"
#include "CXXR/PlainContext.hpp"
Include dependency graph for Promise.cpp:

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Functions

SEXP Rf_mkPROMISE (SEXP expr, SEXP rho)
 Create a CXXR::Promise object.
void SET_PRVALUE (SEXP x, SEXP v)
 Set the value of a CXXR::Promise.

Variables

SEXP(* CXXR::ForceNonInline::PRCODEp )(SEXP x) = PRCODE
SEXP(* CXXR::ForceNonInline::PRENVp )(SEXP x) = PRENV
SEXP(* CXXR::ForceNonInline::PRVALUEp )(SEXP x) = PRVALUE

Detailed Description

Implementation of class CXXR::Promise and associated C interface.


Function Documentation

SEXP Rf_mkPROMISE ( SEXP  expr,
SEXP  env 
)

Create a CXXR::Promise object.

Parameters:
exprExpression to be evaluated to provide the value of the CXXR::Promise.
envCXXR::Environment in which expr is to be evaluated.
void SET_PRVALUE ( SEXP  x,
SEXP  v 
)

Set the value of a CXXR::Promise.

Once the value is set to something other than R_UnboundValue, the environment pointer is set null.

Parameters:
xPointer to a CXXR::Promise (checked).
vPointer to the value to be assigned to the promise.
Todo:
Replace this with a method call to evaluate the promise.