root/trunk/ProjectFortress/LibraryBuiltin/NativeArray.fss

Revision 3179, 2.4 KB (checked in by sukyoungryu, 12 months ago)

[library] The language and package bindings in native components should be private to support the API generator.

Line 
1(*******************************************************************************
2    Copyright 2008 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************)
17
18native component NativeArray
19export NativeArray
20
21private language="java"
22private package="com.sun.fortress.interpreter.glue.prim"
23
24object PrimitiveArray[\T, nat s0\]() extends Array1[\T,0,s0\]
25  get(i:ZZ32):T =
26    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimitiveArray$get")
27  put(i:ZZ32, v:T):() =
28    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimitiveArray$put")
29  init00(i:ZZ32, v:T):Boolean =
30    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimitiveArray$init0")
31  (* We used to validate the result of init00, but that doesn't work if
32     the ith element was initialized as part of a failed transaction. *)
33  init0(i:ZZ32, v:T):() = do _ = init00(i,v); () end
34end
35
36object PrimImmutableArray[\T, nat s0\]() extends ImmutableArray1[\T,0,s0\]
37  get(i:ZZ32):T =
38    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimImmutableArray$get")
39  init00(i:ZZ32, v:T):Boolean =
40    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimImmutableArray$init0")
41  (* We used to validate the result of init00, but that doesn't work if
42     the ith element was initialized as part of a failed transaction. *)
43  init0(i:ZZ32, v:T):() = do _ = init00(i,v); () end
44end
45
46object PrimImmutableRR64Array[\nat s0\]() extends ImmutableArray1[\RR64,0,s0\]
47  get(i:ZZ32):RR64 =
48    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimImmutableRR64Array$get")
49  init00(i:ZZ32, v:RR64):Boolean =
50    builtinPrimitive("com.sun.fortress.interpreter.glue.prim.PrimImmutableRR64Array$init0")
51  (* We used to validate the result of init00, but that doesn't work if
52     the ith element was initialized as part of a failed transaction. *)
53  init0(i:ZZ32, v:RR64):() = do _ = init00(i,v); () end
54end
55
56end
Note: See TracBrowser for help on using the browser.