Mercurial > hg > truffle
comparison src/share/vm/interpreter/bytecodeStream.cpp @ 1579:e9ff18c4ace7
Merge
author | jrose |
---|---|
date | Wed, 02 Jun 2010 22:45:42 -0700 |
parents | c18cbe5936b8 ab102d5d923e |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1562:dfe27f03244a | 1579:e9ff18c4ace7 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2010, 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. |
46 code = (Bytecodes::Code)bcp[1]; | 46 code = (Bytecodes::Code)bcp[1]; |
47 _is_wide = true; | 47 _is_wide = true; |
48 } | 48 } |
49 } | 49 } |
50 } | 50 } |
51 _code = code; | 51 _raw_code = code; |
52 return code; | 52 return code; |
53 } | 53 } |
54 | |
55 #ifdef ASSERT | |
56 void BaseBytecodeStream::assert_raw_index_size(int size) const { | |
57 if (raw_code() == Bytecodes::_invokedynamic && is_raw()) { | |
58 // in raw mode, pretend indy is "bJJ__" | |
59 assert(size == 2, "raw invokedynamic instruction has 2-byte index only"); | |
60 } else { | |
61 bytecode()->assert_index_size(size, raw_code(), is_wide()); | |
62 } | |
63 } | |
64 | |
65 void BaseBytecodeStream::assert_raw_stream(bool want_raw) const { | |
66 if (want_raw) { | |
67 assert( is_raw(), "this function only works on raw streams"); | |
68 } else { | |
69 assert(!is_raw(), "this function only works on non-raw streams"); | |
70 } | |
71 } | |
72 #endif //ASSERT |