Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiClassFileReconstituter.cpp @ 1565:ab102d5d923e
6939207: refactor constant pool index processing
Summary: Factored cleanup of instruction decode which prepares for enhanced ldc semantics.
Reviewed-by: twisti
author | jrose |
---|---|
date | Sun, 23 May 2010 01:38:26 -0700 |
parents | bd02caa94611 |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1564:61b2245abf36 | 1565:ab102d5d923e |
---|---|
1 /* | 1 /* |
2 * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2005-2010 Sun Microsystems, Inc. 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. |
636 assert(Bytecodes::is_java_code(code), "sanity check"); | 636 assert(Bytecodes::is_java_code(code), "sanity check"); |
637 assert(code != Bytecodes::_breakpoint, "sanity check"); | 637 assert(code != Bytecodes::_breakpoint, "sanity check"); |
638 | 638 |
639 // length of bytecode (mnemonic + operands) | 639 // length of bytecode (mnemonic + operands) |
640 address bcp = bs.bcp(); | 640 address bcp = bs.bcp(); |
641 int len = bs.next_bcp() - bcp; | 641 int len = bs.instruction_size(); |
642 assert(len > 0, "length must be > 0"); | 642 assert(len > 0, "length must be > 0"); |
643 | 643 |
644 // copy the bytecodes | 644 // copy the bytecodes |
645 *p = (unsigned char) (bs.is_wide()? Bytecodes::_wide : code); | 645 *p = (unsigned char) (bs.is_wide()? Bytecodes::_wide : code); |
646 if (len > 1) { | 646 if (len > 1) { |