Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java @ 22538:ae2c10d36bed
SLContext: simplify createObject()
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Mon, 11 Jan 2016 14:42:58 +0100 |
parents | d2b4fe945c23 |
children | 762dfc692689 |
comparison
equal
deleted
inserted
replaced
22537:c6f1f40a87ba | 22538:ae2c10d36bed |
---|---|
216 */ | 216 */ |
217 public void evalSource(Source source) { | 217 public void evalSource(Source source) { |
218 Parser.parseSL(this, source); | 218 Parser.parseSL(this, source); |
219 } | 219 } |
220 | 220 |
221 /** | |
222 * Allocate an empty object. | |
223 */ | |
221 public DynamicObject createObject() { | 224 public DynamicObject createObject() { |
222 return LAYOUT.newInstance(emptyShape); | 225 return emptyShape.newInstance(); |
223 } | 226 } |
224 | 227 |
225 public static boolean isSLObject(TruffleObject value) { | 228 public static boolean isSLObject(TruffleObject value) { |
226 return value instanceof DynamicObject && isSLObject((DynamicObject) value); | 229 return value instanceof DynamicObject && isSLObject((DynamicObject) value); |
227 } | 230 } |