Mercurial > hg > graal-compiler
comparison src/share/vm/interpreter/templateInterpreter.cpp @ 2142:8012aa3ccede
4926272: methodOopDesc::method_from_bcp is unsafe
Reviewed-by: coleenp, jrose, kvn, dcubed
author | never |
---|---|
date | Thu, 13 Jan 2011 22:15:41 -0800 |
parents | f95d63e2154a |
children | e1162778c1c8 |
comparison
equal
deleted
inserted
replaced
2130:34d64ad817f4 | 2142:8012aa3ccede |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2011, 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. |
590 // the bytecode. | 590 // the bytecode. |
591 // Note: Bytecodes::_athrow (C1 only) and Bytecodes::_return are the special cases | 591 // Note: Bytecodes::_athrow (C1 only) and Bytecodes::_return are the special cases |
592 // that do not return "Interpreter::deopt_entry(vtos, 0)" | 592 // that do not return "Interpreter::deopt_entry(vtos, 0)" |
593 address TemplateInterpreter::deopt_reexecute_entry(methodOop method, address bcp) { | 593 address TemplateInterpreter::deopt_reexecute_entry(methodOop method, address bcp) { |
594 assert(method->contains(bcp), "just checkin'"); | 594 assert(method->contains(bcp), "just checkin'"); |
595 Bytecodes::Code code = Bytecodes::java_code_at(bcp); | 595 Bytecodes::Code code = Bytecodes::java_code_at(method, bcp); |
596 if (code == Bytecodes::_return) { | 596 if (code == Bytecodes::_return) { |
597 // This is used for deopt during registration of finalizers | 597 // This is used for deopt during registration of finalizers |
598 // during Object.<init>. We simply need to resume execution at | 598 // during Object.<init>. We simply need to resume execution at |
599 // the standard return vtos bytecode to pop the frame normally. | 599 // the standard return vtos bytecode to pop the frame normally. |
600 // reexecuting the real bytecode would cause double registration | 600 // reexecuting the real bytecode would cause double registration |