Mercurial > hg > truffle
comparison src/share/vm/opto/callnode.hpp @ 12355:cefad50507d8
Merge with hs25-b53
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 10:38:03 +0200 |
parents | 3bfb204913de |
children | ad6695638a35 |
comparison
equal
deleted
inserted
replaced
12058:ccb4f2af2319 | 12355:cefad50507d8 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
214 friend class PreserveReexecuteState; | 214 friend class PreserveReexecuteState; |
215 | 215 |
216 // Because JVMState objects live over the entire lifetime of the | 216 // Because JVMState objects live over the entire lifetime of the |
217 // Compile object, they are allocated into the comp_arena, which | 217 // Compile object, they are allocated into the comp_arena, which |
218 // does not get resource marked or reset during the compile process | 218 // does not get resource marked or reset during the compile process |
219 void *operator new( size_t x, Compile* C ) { return C->comp_arena()->Amalloc(x); } | 219 void *operator new( size_t x, Compile* C ) throw() { return C->comp_arena()->Amalloc(x); } |
220 void operator delete( void * ) { } // fast deallocation | 220 void operator delete( void * ) { } // fast deallocation |
221 | 221 |
222 // Create a new JVMState, ready for abstract interpretation. | 222 // Create a new JVMState, ready for abstract interpretation. |
223 JVMState(ciMethod* method, JVMState* caller); | 223 JVMState(ciMethod* method, JVMState* caller); |
224 JVMState(int stack_size); // root state; has a null method | 224 JVMState(int stack_size); // root state; has a null method |
447 //------------------------------SafePointScalarObjectNode---------------------- | 447 //------------------------------SafePointScalarObjectNode---------------------- |
448 // A SafePointScalarObjectNode represents the state of a scalarized object | 448 // A SafePointScalarObjectNode represents the state of a scalarized object |
449 // at a safepoint. | 449 // at a safepoint. |
450 | 450 |
451 class SafePointScalarObjectNode: public TypeNode { | 451 class SafePointScalarObjectNode: public TypeNode { |
452 uint _first_index; // First input edge index of a SafePoint node where | 452 uint _first_index; // First input edge relative index of a SafePoint node where |
453 // states of the scalarized object fields are collected. | 453 // states of the scalarized object fields are collected. |
454 // It is relative to the last (youngest) jvms->_scloff. | |
454 uint _n_fields; // Number of non-static fields of the scalarized object. | 455 uint _n_fields; // Number of non-static fields of the scalarized object. |
455 DEBUG_ONLY(AllocateNode* _alloc;) | 456 DEBUG_ONLY(AllocateNode* _alloc;) |
456 | 457 |
457 virtual uint hash() const ; // { return NO_HASH; } | 458 virtual uint hash() const ; // { return NO_HASH; } |
458 virtual uint cmp( const Node &n ) const; | 459 virtual uint cmp( const Node &n ) const; |
460 | |
461 uint first_index() const { return _first_index; } | |
459 | 462 |
460 public: | 463 public: |
461 SafePointScalarObjectNode(const TypeOopPtr* tp, | 464 SafePointScalarObjectNode(const TypeOopPtr* tp, |
462 #ifdef ASSERT | 465 #ifdef ASSERT |
463 AllocateNode* alloc, | 466 AllocateNode* alloc, |
467 virtual uint ideal_reg() const; | 470 virtual uint ideal_reg() const; |
468 virtual const RegMask &in_RegMask(uint) const; | 471 virtual const RegMask &in_RegMask(uint) const; |
469 virtual const RegMask &out_RegMask() const; | 472 virtual const RegMask &out_RegMask() const; |
470 virtual uint match_edge(uint idx) const; | 473 virtual uint match_edge(uint idx) const; |
471 | 474 |
472 uint first_index() const { return _first_index; } | 475 uint first_index(JVMState* jvms) const { |
476 assert(jvms != NULL, "missed JVMS"); | |
477 return jvms->scloff() + _first_index; | |
478 } | |
473 uint n_fields() const { return _n_fields; } | 479 uint n_fields() const { return _n_fields; } |
474 | 480 |
475 #ifdef ASSERT | 481 #ifdef ASSERT |
476 AllocateNode* alloc() const { return _alloc; } | 482 AllocateNode* alloc() const { return _alloc; } |
477 #endif | 483 #endif |
483 // between the start index of the jvmstates of "new_call" and "s" is | 489 // between the start index of the jvmstates of "new_call" and "s" is |
484 // "jvms_adj". Produce and return a SafePointScalarObjectNode that | 490 // "jvms_adj". Produce and return a SafePointScalarObjectNode that |
485 // corresponds appropriately to "this" in "new_call". Assumes that | 491 // corresponds appropriately to "this" in "new_call". Assumes that |
486 // "sosn_map" is a map, specific to the translation of "s" to "new_call", | 492 // "sosn_map" is a map, specific to the translation of "s" to "new_call", |
487 // mapping old SafePointScalarObjectNodes to new, to avoid multiple copies. | 493 // mapping old SafePointScalarObjectNodes to new, to avoid multiple copies. |
488 SafePointScalarObjectNode* clone(int jvms_adj, Dict* sosn_map) const; | 494 SafePointScalarObjectNode* clone(Dict* sosn_map) const; |
489 | 495 |
490 #ifndef PRODUCT | 496 #ifndef PRODUCT |
491 virtual void dump_spec(outputStream *st) const; | 497 virtual void dump_spec(outputStream *st) const; |
492 #endif | 498 #endif |
493 }; | 499 }; |