Mercurial > hg > truffle
comparison src/share/vm/interpreter/interpreterRuntime.cpp @ 710:e5b0439ef4ae
6655638: dynamic languages need method handles
Summary: initial implementation, with known omissions (x86/64, sparc, compiler optim., c-oops, C++ interp.)
Reviewed-by: kvn, twisti, never
author | jrose |
---|---|
date | Wed, 08 Apr 2009 10:56:49 -0700 |
parents | a61af66fc99e |
children | be93aad57795 |
comparison
equal
deleted
inserted
replaced
709:1d037ecd7960 | 710:e5b0439ef4ae |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2009 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. |
290 } | 290 } |
291 | 291 |
292 // create exception | 292 // create exception |
293 THROW_MSG(vmSymbols::java_lang_ClassCastException(), message); | 293 THROW_MSG(vmSymbols::java_lang_ClassCastException(), message); |
294 IRT_END | 294 IRT_END |
295 | |
296 // required can be either a MethodType, or a Class (for a single argument) | |
297 // actual (if not null) can be either a MethodHandle, or an arbitrary value (for a single argument) | |
298 IRT_ENTRY(void, InterpreterRuntime::throw_WrongMethodTypeException(JavaThread* thread, | |
299 oopDesc* required, | |
300 oopDesc* actual)) { | |
301 ResourceMark rm(thread); | |
302 char* message = SharedRuntime::generate_wrong_method_type_message(thread, required, actual); | |
303 | |
304 if (ProfileTraps) { | |
305 note_trap(thread, Deoptimization::Reason_constraint, CHECK); | |
306 } | |
307 | |
308 // create exception | |
309 THROW_MSG(vmSymbols::java_dyn_WrongMethodTypeException(), message); | |
310 } | |
311 IRT_END | |
312 | |
295 | 313 |
296 | 314 |
297 // exception_handler_for_exception(...) returns the continuation address, | 315 // exception_handler_for_exception(...) returns the continuation address, |
298 // the exception oop (via TLS) and sets the bci/bcp for the continuation. | 316 // the exception oop (via TLS) and sets the bci/bcp for the continuation. |
299 // The exception oop is returned to make sure it is preserved over GC (it | 317 // The exception oop is returned to make sure it is preserved over GC (it |