Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/value/MutableFrameState.java @ 2515:4fdef1464592
Removed extended bytecodes and related HIR instructions.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 15:36:29 +0200 |
parents | 16b9a8b5ad39 |
children | 274360f98f97 |
comparison
equal
deleted
inserted
replaced
2514:34b5eea9b001 | 2515:4fdef1464592 |
---|---|
22 */ | 22 */ |
23 package com.sun.c1x.value; | 23 package com.sun.c1x.value; |
24 | 24 |
25 import java.util.*; | 25 import java.util.*; |
26 | 26 |
27 import com.sun.c1x.*; | |
28 import com.sun.c1x.ir.*; | 27 import com.sun.c1x.ir.*; |
29 import com.sun.c1x.util.*; | 28 import com.sun.c1x.util.*; |
30 import com.sun.cri.ci.*; | 29 import com.sun.cri.ci.*; |
31 | 30 |
32 | 31 |
265 assertHigh(xpop()); | 264 assertHigh(xpop()); |
266 return assertDouble(xpop()); | 265 return assertDouble(xpop()); |
267 } | 266 } |
268 | 267 |
269 private static Value assertKind(CiKind kind, Value x) { | 268 private static Value assertKind(CiKind kind, Value x) { |
270 assert x != null && (x.kind == kind || !isTypesafe()) : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.kind); | 269 assert x != null && (x.kind == kind) : "kind=" + kind + ", value=" + x + ((x == null) ? "" : ", value.kind=" + x.kind); |
271 return x; | 270 return x; |
272 } | 271 } |
273 | 272 |
274 private static Value assertLong(Value x) { | 273 private static Value assertLong(Value x) { |
275 assert x != null && (x.kind == CiKind.Long || !isTypesafe()); | 274 assert x != null && (x.kind == CiKind.Long); |
276 return x; | 275 return x; |
277 } | 276 } |
278 | 277 |
279 private static Value assertJsr(Value x) { | 278 private static Value assertJsr(Value x) { |
280 assert x != null && (x.kind == CiKind.Jsr || !isTypesafe()); | 279 assert x != null && (x.kind == CiKind.Jsr); |
281 return x; | 280 return x; |
282 } | 281 } |
283 | 282 |
284 private static Value assertInt(Value x) { | 283 private static Value assertInt(Value x) { |
285 assert x != null && (x.kind == CiKind.Int || !isTypesafe()); | 284 assert x != null && (x.kind == CiKind.Int); |
286 return x; | 285 return x; |
287 } | 286 } |
288 | 287 |
289 private static Value assertFloat(Value x) { | 288 private static Value assertFloat(Value x) { |
290 assert x != null && (x.kind == CiKind.Float || !isTypesafe()); | 289 assert x != null && (x.kind == CiKind.Float); |
291 return x; | 290 return x; |
292 } | 291 } |
293 | 292 |
294 private static Value assertObject(Value x) { | 293 private static Value assertObject(Value x) { |
295 assert x != null && (x.kind == CiKind.Object || !isTypesafe()); | 294 assert x != null && (x.kind == CiKind.Object); |
296 return x; | 295 return x; |
297 } | 296 } |
298 | 297 |
299 private static Value assertWord(Value x) { | 298 private static Value assertWord(Value x) { |
300 assert x != null && (x.kind == CiKind.Word || !isTypesafe()); | 299 assert x != null && (x.kind == CiKind.Word); |
301 return x; | 300 return x; |
302 } | 301 } |
303 | 302 |
304 private static Value assertDouble(Value x) { | 303 private static Value assertDouble(Value x) { |
305 assert x != null && (x.kind == CiKind.Double || !isTypesafe()); | 304 assert x != null && (x.kind == CiKind.Double); |
306 return x; | 305 return x; |
307 } | 306 } |
308 | 307 |
309 /** | 308 /** |
310 * Pop the specified number of slots off of this stack and return them as an array of instructions. | 309 * Pop the specified number of slots off of this stack and return them as an array of instructions. |
350 */ | 349 */ |
351 public FrameState immutableCopy(int bci) { | 350 public FrameState immutableCopy(int bci) { |
352 return copy(bci, true, true, true); | 351 return copy(bci, true, true, true); |
353 } | 352 } |
354 | 353 |
355 /** | |
356 * Determines if the current compilation is typesafe. | |
357 */ | |
358 private static boolean isTypesafe() { | |
359 return C1XCompilation.compilation().isTypesafe(); | |
360 } | |
361 | |
362 private static void assertHigh(Value x) { | 354 private static void assertHigh(Value x) { |
363 assert x == null; | 355 assert x == null; |
364 } | 356 } |
365 | 357 |
366 } | 358 } |