Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/nativeInst_sparc.cpp @ 1563:1a5913bf5e19
6951083: oops and relocations should part of nmethod not CodeBlob
Summary: This moves the oops from Codeblob to nmethod.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Thu, 20 May 2010 06:34:23 -0700 |
parents | 6b2273dd6fa9 |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1544:1a88d3c58e1d | 1563:1a5913bf5e19 |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 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. |
319 set_long_at(sethi_offset, set_data32_sethi( long_at(sethi_offset), x)); | 319 set_long_at(sethi_offset, set_data32_sethi( long_at(sethi_offset), x)); |
320 #endif | 320 #endif |
321 set_long_at(add_offset, set_data32_simm13( long_at(add_offset), x)); | 321 set_long_at(add_offset, set_data32_simm13( long_at(add_offset), x)); |
322 | 322 |
323 // also store the value into an oop_Relocation cell, if any | 323 // also store the value into an oop_Relocation cell, if any |
324 CodeBlob* nm = CodeCache::find_blob(instruction_address()); | 324 CodeBlob* cb = CodeCache::find_blob(instruction_address()); |
325 nmethod* nm = cb ? cb->as_nmethod_or_null() : NULL; | |
325 if (nm != NULL) { | 326 if (nm != NULL) { |
326 RelocIterator iter(nm, instruction_address(), next_instruction_address()); | 327 RelocIterator iter(nm, instruction_address(), next_instruction_address()); |
327 oop* oop_addr = NULL; | 328 oop* oop_addr = NULL; |
328 while (iter.next()) { | 329 while (iter.next()) { |
329 if (iter.type() == relocInfo::oop_type) { | 330 if (iter.type() == relocInfo::oop_type) { |
428 set_long_at(sethi_offset, set_data32_sethi(long_at(sethi_offset), x)); | 429 set_long_at(sethi_offset, set_data32_sethi(long_at(sethi_offset), x)); |
429 #endif | 430 #endif |
430 set_long_at(add_offset, set_data32_simm13(long_at(add_offset), x)); | 431 set_long_at(add_offset, set_data32_simm13(long_at(add_offset), x)); |
431 | 432 |
432 // also store the value into an oop_Relocation cell, if any | 433 // also store the value into an oop_Relocation cell, if any |
433 CodeBlob* nm = CodeCache::find_blob(instruction_address()); | 434 CodeBlob* cb = CodeCache::find_blob(instruction_address()); |
435 nmethod* nm = cb ? cb->as_nmethod_or_null() : NULL; | |
434 if (nm != NULL) { | 436 if (nm != NULL) { |
435 RelocIterator iter(nm, instruction_address(), next_instruction_address()); | 437 RelocIterator iter(nm, instruction_address(), next_instruction_address()); |
436 oop* oop_addr = NULL; | 438 oop* oop_addr = NULL; |
437 while (iter.next()) { | 439 while (iter.next()) { |
438 if (iter.type() == relocInfo::oop_type) { | 440 if (iter.type() == relocInfo::oop_type) { |