mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6939207: refactor constant pool index processing
Factored cleanup of instruction decode which prepares for enhanced ldc semantics. Reviewed-by: twisti
This commit is contained in:
parent
2e24ba80e9
commit
581521ba96
40 changed files with 875 additions and 592 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
|
@ -40,9 +40,13 @@ class InterpreterRuntime: AllStatic {
|
|||
return Bytecodes::code_at(bcp(thread), method(thread));
|
||||
}
|
||||
static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); }
|
||||
static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; }
|
||||
static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); }
|
||||
static int four_byte_index(JavaThread *thread) { return Bytes::get_native_u4(bcp(thread) + 1); }
|
||||
static Bytecode* bytecode(JavaThread *thread) { return Bytecode_at(bcp(thread)); }
|
||||
static int get_index_u1(JavaThread *thread, Bytecodes::Code bc)
|
||||
{ return bytecode(thread)->get_index_u1(bc); }
|
||||
static int get_index_u2(JavaThread *thread, Bytecodes::Code bc)
|
||||
{ return bytecode(thread)->get_index_u2(bc); }
|
||||
static int get_index_u2_cpcache(JavaThread *thread, Bytecodes::Code bc)
|
||||
{ return bytecode(thread)->get_index_u2_cpcache(bc); }
|
||||
static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; }
|
||||
|
||||
static ConstantPoolCacheEntry* cache_entry_at(JavaThread *thread, int i) { return method(thread)->constants()->cache()->entry_at(i); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue