6919934: JSR 292 needs to support x86 C1

This implements JSR 292 support for C1 x86.

Reviewed-by: never, jrose, kvn
This commit is contained in:
Christian Thalinger 2010-03-09 20:16:19 +01:00
parent 94a808f51d
commit ffec4c00c4
37 changed files with 420 additions and 287 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1999-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -334,13 +334,14 @@ void Intrinsic::state_values_do(void f(Value*)) {
Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values* args,
int vtable_index, ciMethod* target)
int vtable_index, ciMethod* target, ValueStack* state_before)
: StateSplit(result_type)
, _code(code)
, _recv(recv)
, _args(args)
, _vtable_index(vtable_index)
, _target(target)
, _state_before(state_before)
{
set_flag(TargetIsLoadedFlag, target->is_loaded());
set_flag(TargetIsFinalFlag, target_is_loaded() && target->is_final_method());
@ -355,6 +356,9 @@ Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values*
_signature = new BasicTypeList(number_of_arguments() + (has_receiver() ? 1 : 0));
if (has_receiver()) {
_signature->append(as_BasicType(receiver()->type()));
} else if (is_invokedynamic()) {
// Add the synthetic MethodHandle argument to the signature.
_signature->append(T_OBJECT);
}
for (int i = 0; i < number_of_arguments(); i++) {
ValueType* t = argument_at(i)->type();
@ -364,6 +368,13 @@ Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values*
}
void Invoke::state_values_do(void f(Value*)) {
StateSplit::state_values_do(f);
if (state_before() != NULL) state_before()->values_do(f);
if (state() != NULL) state()->values_do(f);
}
// Implementation of Contant
intx Constant::hash() const {
if (_state == NULL) {