Mercurial > hg > truffle
comparison src/share/vm/opto/node.cpp @ 7434:32164d89fe9c
8004845: Catch incorrect usage of new and delete during compile time for value objects and stack objects
Summary: Makes the "new" and "delete" operator of _ValueObj and StackObj private
Reviewed-by: dholmes, coleenp
Contributed-by: erik.helin@oracle.com
author | brutisso |
---|---|
date | Mon, 17 Dec 2012 15:25:26 +0100 |
parents | 2aff40cb4703 |
children | a7114d3d712e |
comparison
equal
deleted
inserted
replaced
7433:730cc4ddd550 | 7434:32164d89fe9c |
---|---|
1837 // and true for everything else. Weird for calls & returns. | 1837 // and true for everything else. Weird for calls & returns. |
1838 uint Node::match_edge(uint idx) const { | 1838 uint Node::match_edge(uint idx) const { |
1839 return idx; // True for other than index 0 (control) | 1839 return idx; // True for other than index 0 (control) |
1840 } | 1840 } |
1841 | 1841 |
1842 static RegMask _not_used_at_all; | |
1842 // Register classes are defined for specific machines | 1843 // Register classes are defined for specific machines |
1843 const RegMask &Node::out_RegMask() const { | 1844 const RegMask &Node::out_RegMask() const { |
1844 ShouldNotCallThis(); | 1845 ShouldNotCallThis(); |
1845 return *(new RegMask()); | 1846 return _not_used_at_all; |
1846 } | 1847 } |
1847 | 1848 |
1848 const RegMask &Node::in_RegMask(uint) const { | 1849 const RegMask &Node::in_RegMask(uint) const { |
1849 ShouldNotCallThis(); | 1850 ShouldNotCallThis(); |
1850 return *(new RegMask()); | 1851 return _not_used_at_all; |
1851 } | 1852 } |
1852 | 1853 |
1853 //============================================================================= | 1854 //============================================================================= |
1854 //----------------------------------------------------------------------------- | 1855 //----------------------------------------------------------------------------- |
1855 void Node_Array::reset( Arena *new_arena ) { | 1856 void Node_Array::reset( Arena *new_arena ) { |