Mercurial > hg > truffle
diff src/share/vm/adlc/adlparse.cpp @ 4114:6729bbc1fcd6
7003454: order constants in constant table by number of references in code
Reviewed-by: kvn, never, bdelsart
author | twisti |
---|---|
date | Wed, 16 Nov 2011 01:39:50 -0800 |
parents | c7b60b601eb4 |
children | f03a3c8bd5e5 |
line wrap: on
line diff
--- a/src/share/vm/adlc/adlparse.cpp Mon Nov 14 18:38:03 2011 -0800 +++ b/src/share/vm/adlc/adlparse.cpp Wed Nov 16 01:39:50 2011 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3115,7 +3115,7 @@ encoding->add_code(" _constant = C->constant_table().add"); // Parse everything in ( ) expression. - encoding->add_code("("); + encoding->add_code("(this, "); next_char(); // Skip '(' int parens_depth = 1; @@ -3130,7 +3130,8 @@ } else if (_curchar == ')') { parens_depth--; - encoding->add_code(")"); + if (parens_depth > 0) + encoding->add_code(")"); next_char(); } else { @@ -3157,7 +3158,7 @@ } // Finish code line. - encoding->add_code(";"); + encoding->add_code(");"); if (_AD._adlocation_debug) { encoding->add_code(end_line_marker());