comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/builtins/SLNewObjectBuiltin.java @ 18412:997bc9764a9a

SL: use the truffle object storage model to represent SL objects
author Andreas Woess <andreas.woess@jku.at>
date Tue, 18 Nov 2014 12:08:51 +0100
parents dc2e000bed40
children 2d2fcdbae37b
comparison
equal deleted inserted replaced
18411:dc2e000bed40 18412:997bc9764a9a
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.oracle.truffle.sl.builtins; 23 package com.oracle.truffle.sl.builtins;
24
25 import java.util.*;
26 24
27 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; 25 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
28 import com.oracle.truffle.api.dsl.*; 26 import com.oracle.truffle.api.dsl.*;
29 import com.oracle.truffle.api.nodes.*; 27 import com.oracle.truffle.api.nodes.*;
30 import com.oracle.truffle.api.source.*; 28 import com.oracle.truffle.api.source.*;
46 super(new NullSourceSection("SL builtin", "new")); 44 super(new NullSourceSection("SL builtin", "new"));
47 } 45 }
48 46
49 @Specialization 47 @Specialization
50 public Object newObject() { 48 public Object newObject() {
51 return new HashMap<>(); 49 return getContext().createObject();
52 } 50 }
53 } 51 }