Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalJavaAccess.cpp @ 9661:c6f3c1e48f54
better error message
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 13 May 2013 13:59:34 +0200 |
parents | 0266549ff6e0 |
children | ed6202820ecf |
comparison
equal
deleted
inserted
replaced
9660:c37c52445e75 | 9661:c6f3c1e48f54 |
---|---|
29 // It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded. | 29 // It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded. |
30 | 30 |
31 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field) { | 31 void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field) { |
32 Symbol* name_symbol = SymbolTable::probe(name, (int)strlen(name)); | 32 Symbol* name_symbol = SymbolTable::probe(name, (int)strlen(name)); |
33 Symbol* signature_symbol = SymbolTable::probe(signature, (int)strlen(signature)); | 33 Symbol* signature_symbol = SymbolTable::probe(signature, (int)strlen(signature)); |
34 #ifndef PRODUCT | |
35 if (name_symbol == NULL || signature_symbol == NULL) { | 34 if (name_symbol == NULL || signature_symbol == NULL) { |
36 tty->print_cr("symbol with name %s was not found in symbol table (klass=%s)", name, klass->name()->as_C_string()); | 35 guarantee(false, err_msg("symbol with name %s and signature %s was not found in symbol table (klass=%s)", name, signature, klass->name()->as_C_string())); |
37 } | |
38 #endif | |
39 if (name_symbol == NULL || signature_symbol == NULL) { | |
40 guarantee(false, err_msg("symbol not found - class layout of %s changed?", klass->name()->as_C_string())); | |
41 } | 36 } |
42 | 37 |
43 InstanceKlass* ik = InstanceKlass::cast(klass); | 38 InstanceKlass* ik = InstanceKlass::cast(klass); |
44 fieldDescriptor fd; | 39 fieldDescriptor fd; |
45 if (!ik->find_field(name_symbol, signature_symbol, &fd)) { | 40 if (!ik->find_field(name_symbol, signature_symbol, &fd)) { |