It always returned true. Propagated change along all call paths.
* src/native/vm/reflection.cpp: Propagated conditional removal.
* src/vm/descriptor.cpp: Removed return value.
* src/vm/descriptor.hpp: Likewise.
* src/vm/jit/optimizing/bytecode_escape.c: Propagated conditional removal.
* src/vm/jit/parse.cpp: Likewise.
* src/vm/jit/verify/typecheck-common.cpp: Likewise.
* src/vm/jit/verify/typecheck-invoke.inc: Likewise.
* src/vm/jit/verify/typecheck-stackbased.cpp: Likewise.
* src/vm/loader.cpp: Likewise.
* src/vm/method.cpp (method_get_parametercount): Propagated return value
handling.
* src/vm/resolve.cpp: Likewise.
/* src/native/vm/reflection.cpp - helper functions for java/lang/reflect
- Copyright (C) 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
int32_t numParameters = method_get_parametercount(m);
- if (numParameters < 0)
- return NULL;
-
/* get ConstantPool */
java_handle_t* h = native_new_and_init(class_sun_reflect_ConstantPool);
ACC_STATIC bit is checked.
The value ACC_UNDEF is NOT allowed.
- RETURN VALUE:
- true.............the paramdescs were created successfully
- false............an exception has been thrown
-
POSTCONDITION:
md->parms != NULL
*******************************************************************************/
-bool descriptor_params_from_paramtypes(methoddesc *md, s4 mflags)
+void descriptor_params_from_paramtypes(methoddesc *md, s4 mflags)
{
typedesc *td;
md_param_alloc(md);
}
#endif
-
- return true;
}
methoddesc *descriptor_pool_parse_method_descriptor(descriptor_pool *pool, utf *desc, s4 mflags,
constant_classref *thisclass);
-bool descriptor_params_from_paramtypes(methoddesc *md, s4 mflags);
+void descriptor_params_from_paramtypes(methoddesc *md, s4 mflags);
void descriptor_pool_get_sizes(descriptor_pool *pool, u4 *classrefsize,
u4 *descsize);
/* src/vm/optimizing/bytecode_escape.c
- Copyright (C) 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
This file is part of CACAO.
/* Parse parameters if not done yet. */
- if (md->params == NULL) {
- if (! descriptor_params_from_paramtypes(md, opc == BC_invokestatic ? ACC_STATIC : 0)) {
- /* TODO */
- assert(0);
- }
- }
+ if (md->params == NULL)
+ descriptor_params_from_paramtypes(md, opc == BC_invokestatic ? ACC_STATIC : 0);
/* Try to lazyly resolve method. */
}
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
+
/* src/vm/jit/parse.c - parser for JavaVM to intermediate code translation
- Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
md = fmi->parseddesc.md;
if (md->params == NULL)
- if (!descriptor_params_from_paramtypes(md, ACC_STATIC))
- return false;
+ descriptor_params_from_paramtypes(md, ACC_STATIC);
goto invoke_method;
md = fmi->parseddesc.md;
if (md->params == NULL)
- if (!descriptor_params_from_paramtypes(md, 0))
- return false;
+ descriptor_params_from_paramtypes(md, 0);
invoke_method:
code_unflag_leafmethod(code);
(opcode == BC_invokestatic),
(opcode == BC_invokespecial));
- if (um == NULL)
- return false;
-
/* store the unresolved_method pointer */
iptr->sx.s23.s3.um = um;
/* src/vm/jit/verify/typecheck-common.c - shared verifier code
- Copyright (C) 1996-2005, 2006, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* allocate parameter descriptors if necessary */
if (!state->m->parseddesc->params)
- if (!descriptor_params_from_paramtypes(state->m->parseddesc,state->m->flags))
- return false;
+ descriptor_params_from_paramtypes(state->m->parseddesc,state->m->flags);
/* pre-initialize variables as TYPE_VOID */
/* src/vm/jit/verify/typecheck-invoke.inc - type checking for invocations
- Copyright (C) 1996-2005, 2006, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* allocate parameters if necessary */
if (!md->params)
- if (!descriptor_params_from_paramtypes(md,
- (invokestatic) ? ACC_STATIC : ACC_NONE))
- return false;
+ descriptor_params_from_paramtypes(
+ md,
+ (invokestatic) ? ACC_STATIC : ACC_NONE);
/* check parameter types */
/* src/vm/jit/verify/typecheck-stackbased.c - stack-based verifier
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* allocate parameter descriptors if necessary */
if (!state.m->parseddesc->params)
- if (!descriptor_params_from_paramtypes(state.m->parseddesc,state.m->flags))
- return false;
+ descriptor_params_from_paramtypes(state.m->parseddesc,state.m->flags);
/* allocate the stack buffers */
/* parse the descriptor to get the register allocation */
- if (!descriptor_params_from_paramtypes(clonedesc, clone->flags))
- return false;
+ descriptor_params_from_paramtypes(clonedesc, clone->flags);
clone->code = NativeStub::generate(clone, BUILTIN_clone);
/* src/vm/method.cpp - method functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
m........the method of which the parameters should be counted
RETURN VALUE:
- The parameter count or -1 on error.
+ The parameter count.
*******************************************************************************/
/* is the descriptor fully parsed? */
- if (md->params == NULL) {
- if (!descriptor_params_from_paramtypes(md, m->flags)) {
- return -1;
- }
- }
+ if (md->params == NULL)
+ descriptor_params_from_paramtypes(md, m->flags);
paramcount = md->paramcount;
/* is the descriptor fully parsed? */
if (m->parseddesc->params == NULL)
- if (!descriptor_params_from_paramtypes(md, m->flags))
- return NULL;
+ descriptor_params_from_paramtypes(md, m->flags);
paramtypes = md->paramtypes;
paramcount = md->paramcount;
/* src/vm/resolve.cpp - resolving classes/interfaces/fields/methods
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* have the method params already been parsed? no, do it. */
if (!mi->parseddesc->params)
- if (!descriptor_params_from_paramtypes(mi->parseddesc, mi->flags))
- return resolveFailed;
+ descriptor_params_from_paramtypes(mi->parseddesc, mi->flags);
/* cache the result of the resolution */
/* have the method params already been parsed? no, do it. */
if (!mi->parseddesc->params)
- if (!descriptor_params_from_paramtypes(mi->parseddesc, mi->flags))
- return false;
+ descriptor_params_from_paramtypes(mi->parseddesc, mi->flags);
/* cache the resolution */
iptr.............the INVOKE* instruction
RETURN VALUE:
- a pointer to a new unresolved_method struct, or
- NULL if an exception has been thrown
+ a pointer to a new unresolved_method struct
*******************************************************************************/
/* allocate params if necessary */
if (!methodref->parseddesc.md->params)
- if (!descriptor_params_from_paramtypes(methodref->parseddesc.md,
- (invokestatic) ? ACC_STATIC : ACC_NONE))
- return NULL;
+ descriptor_params_from_paramtypes(
+ methodref->parseddesc.md,
+ (invokestatic) ? ACC_STATIC : ACC_NONE);
/* create the data structure */
ref = NEW(unresolved_method);