Mercurial > hg > truffle
comparison src/share/vm/interpreter/interpreter.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | b9a9ed0f8eeb |
children | a5de0cc2f91c |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, 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 friend class VMStructs; | 46 friend class VMStructs; |
47 private: | 47 private: |
48 int _size; // the size in bytes | 48 int _size; // the size in bytes |
49 const char* _description; // a description of the codelet, for debugging & printing | 49 const char* _description; // a description of the codelet, for debugging & printing |
50 Bytecodes::Code _bytecode; // associated bytecode if any | 50 Bytecodes::Code _bytecode; // associated bytecode if any |
51 DEBUG_ONLY(CodeComments _comments;) // Comments for annotating assembler output. | |
51 | 52 |
52 public: | 53 public: |
53 // Initialization/finalization | 54 // Initialization/finalization |
54 void initialize(int size) { _size = size; } | 55 void initialize(int size, |
56 CodeComments& comments) { _size = size; DEBUG_ONLY(_comments.assign(comments);) } | |
55 void finalize() { ShouldNotCallThis(); } | 57 void finalize() { ShouldNotCallThis(); } |
56 | 58 |
57 // General info/converters | 59 // General info/converters |
58 int size() const { return _size; } | 60 int size() const { return _size; } |
59 static int code_size_to_size(int code_size) { return round_to(sizeof(InterpreterCodelet), CodeEntryAlignment) + code_size; } | 61 static int code_size_to_size(int code_size) { return round_to(sizeof(InterpreterCodelet), CodeEntryAlignment) + code_size; } |
127 // make sure all code is in code buffer | 129 // make sure all code is in code buffer |
128 (*_masm)->flush(); | 130 (*_masm)->flush(); |
129 | 131 |
130 | 132 |
131 // commit Codelet | 133 // commit Codelet |
132 AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size()); | 134 AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->comments()); |
133 // make sure nobody can use _masm outside a CodeletMark lifespan | 135 // make sure nobody can use _masm outside a CodeletMark lifespan |
134 *_masm = NULL; | 136 *_masm = NULL; |
135 } | 137 } |
136 }; | 138 }; |
137 | 139 |