Commit 2d60ede8 authored by simonmar's avatar simonmar

[project @ 2000-08-21 13:34:06 by simonmar]

- Add touch# and foreignObjToAddr#.

- Add a long comment to the beginning of this file listing the files
  that need to be updated when adding a new primop.
parent 0f7d86ee
-----------------------------------------------------------------------
-- $Id: primops.txt,v 1.2 2000/08/21 13:34:06 simonmar Exp $
--
-- Primitive Operations
--
-----------------------------------------------------------------------
-- To add a new primop, you currently need to update the following files:
--
-- - this file (ghc/compiler/prelude/primops.txt), which includes
-- the type of the primop, and various other properties (its
-- strictness attributes, whether it is defined as a macro
-- or as out-of-line code, etc.)
--
-- - ghc/lib/std/PrelGHC.hi-boot, to declare the primop
--
-- - if the primop is inline (i.e. a macro), then:
-- ghc/includes/PrimOps.h
-- ghc/compiler/nativeGen/StixPrim.lhs
--
-- - or, for an out-of-line primop:
-- ghc/includes/PrimOps.h (just add the declaration)
-- ghc/rts/PrimOps.hc (define it here)
--
-- - the User's Guide
--
-- The default attribute values which apply if you don't specify
-- other ones. Attribute values can be True, False, or arbitrary
......@@ -15,7 +41,6 @@ defaults
strictness = { \ arity -> StrictnessInfo (replicate arity wwPrim) False }
usage = { nomangle other }
------------------------------------------------------------------------
--- Addr# ---
------------------------------------------------------------------------
......@@ -930,6 +955,14 @@ primop WriteForeignObjOp "writeForeignObj#" GenPrimOp
with
has_side_effects = True
primop ForeignObjToAddrOp "foreignObjToAddr#" GenPrimOp
ForeignObj# -> Addr#
primop TouchOp "touch#" GenPrimOp
o -> State# RealWorld -> State# RealWorld
with
strictness = { \ arity -> StrictnessInfo [wwLazy, wwPrim] False }
------------------------------------------------------------------------
--- Bytecode objects ---
------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment