Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/templateInterpreter_x86_32.cpp @ 6123:2fe087c3e814
7172967: Eliminate constMethod's _method backpointer to methodOop.
Summary: Eliminate constMethod's _method backpointer to methodOop, and move the _constant field from methodOop to constMethod.
Reviewed-by: roland, bdelsart, kamg
author | jiangli |
---|---|
date | Wed, 06 Jun 2012 14:33:43 -0400 |
parents | 6759698e3140 |
children | 1d7922586cf6 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Fri Jun 01 15:30:44 2012 -0700 +++ b/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Wed Jun 06 14:33:43 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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 @@ -566,7 +566,8 @@ __ testl(rax, JVM_ACC_STATIC); __ movptr(rax, Address(rdi, Interpreter::local_offset_in_bytes(0))); // get receiver (assume this is frequent case) __ jcc(Assembler::zero, done); - __ movptr(rax, Address(rbx, methodOopDesc::constants_offset())); + __ movptr(rax, Address(rbx, methodOopDesc::const_offset())); + __ movptr(rax, Address(rax, constMethodOopDesc::constants_offset())); __ movptr(rax, Address(rax, constantPoolOopDesc::pool_holder_offset_in_bytes())); __ movptr(rax, Address(rax, mirror_offset)); __ bind(done); @@ -606,7 +607,8 @@ __ push(0); } - __ movptr(rdx, Address(rbx, methodOopDesc::constants_offset())); + __ movptr(rdx, Address(rbx, methodOopDesc::const_offset())); + __ movptr(rdx, Address(rdx, constMethodOopDesc::constants_offset())); __ movptr(rdx, Address(rdx, constantPoolOopDesc::cache_offset_in_bytes())); __ push(rdx); // set constant pool cache __ push(rdi); // set locals pointer @@ -661,9 +663,9 @@ __ testptr(rax, rax); __ jcc(Assembler::zero, slow_path); - __ movptr(rdi, Address(rbx, methodOopDesc::constants_offset())); // read first instruction word and extract bytecode @ 1 and index @ 2 __ movptr(rdx, Address(rbx, methodOopDesc::const_offset())); + __ movptr(rdi, Address(rdx, constMethodOopDesc::constants_offset())); __ movl(rdx, Address(rdx, constMethodOopDesc::codes_offset())); // Shift codes right to get the index on the right. // The bytecode fetched looks like <index><0xb4><0x2a> @@ -1026,7 +1028,8 @@ __ testl(t, JVM_ACC_STATIC); __ jcc(Assembler::zero, L); // get mirror - __ movptr(t, Address(method, methodOopDesc:: constants_offset())); + __ movptr(t, Address(method, methodOopDesc:: const_offset())); + __ movptr(t, Address(t, constMethodOopDesc::constants_offset())); __ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes())); __ movptr(t, Address(t, mirror_offset)); // copy mirror into activation frame