Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java @ 22202:3d9e283e2487
The PolyglotEngine passed to executionStart cannot be null or bad things happen then.
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Tue, 29 Sep 2015 18:04:11 +0200 |
parents | 2e7352f9ffa8 |
children | dc91e9ee752e 0d36601f233e |
comparison
equal
deleted
inserted
replaced
22201:df6a1647cfb3 | 22202:3d9e283e2487 |
---|---|
186 | 186 |
187 private static Reference<Object> previousVM = new WeakReference<>(null); | 187 private static Reference<Object> previousVM = new WeakReference<>(null); |
188 private static Assumption oneVM = Truffle.getRuntime().createAssumption(); | 188 private static Assumption oneVM = Truffle.getRuntime().createAssumption(); |
189 | 189 |
190 protected Closeable executionStart(Object vm, Debugger[] fillIn, Source s) { | 190 protected Closeable executionStart(Object vm, Debugger[] fillIn, Source s) { |
191 vm.getClass(); | |
191 final Closeable debugClose = DEBUG.executionStart(vm, fillIn, s); | 192 final Closeable debugClose = DEBUG.executionStart(vm, fillIn, s); |
192 final Object prev = CURRENT_VM.get(); | 193 final Object prev = CURRENT_VM.get(); |
193 if (!(vm == previousVM.get())) { | 194 if (!(vm == previousVM.get())) { |
194 previousVM = new WeakReference<>(vm); | 195 previousVM = new WeakReference<>(vm); |
195 oneVM.invalidate(); | 196 oneVM.invalidate(); |