Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/runtime/c-libs/smlnj-runtime/alloc-code.c
ViewVC logotype

View of /sml/trunk/src/runtime/c-libs/smlnj-runtime/alloc-code.c

Parent Directory Parent Directory | Revision Log Revision Log

Revision 986 - (download) (as text) (annotate)
Wed Nov 21 21:03:17 2001 UTC (18 years, 7 months ago) by blume
File size: 714 byte(s)
Release 110.37 -- see HISTORY
/* alloc-code.c
 * COPYRIGHT (c) 1994 by AT&T Bell Laboratories.

#include "cache-flush.h"
#include "ml-base.h"
#include "ml-values.h"
#include "ml-state.h"
#include "ml-objects.h"
#include "cfun-proto-list.h"

/* _ml_RunT_alloc_code : int -> Word8Array.array
 * Allocate a code object of the given size.
 * Note: Generating the name string within the code object is now
 *       part of the code generator's responsibility.
ml_val_t _ml_RunT_alloc_code (ml_state_t *msp, ml_val_t arg)
    int		nbytes = INT_MLtoC(arg);
    ml_val_t	code, res;

    code = ML_AllocCode (msp, nbytes);

    SEQHDR_ALLOC(msp, res, DESC_word8arr, code, nbytes);

    return res;
} /* end of _ml_RunT_alloc_code */

ViewVC Help
Powered by ViewVC 1.0.0