Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/classFileParser.cpp @ 1144:9b9c1ee9b3f6
Merge
author | iveresov |
---|---|
date | Wed, 06 Jan 2010 22:21:39 -0800 |
parents | a5a6adfca6ec 4ce7240d622c |
children | b9d85fcdf743 |
comparison
equal
deleted
inserted
replaced
1129:a5a6adfca6ec | 1144:9b9c1ee9b3f6 |
---|---|
428 switch (cp->tag_at(index).value()) { | 428 switch (cp->tag_at(index).value()) { |
429 | 429 |
430 case JVM_CONSTANT_UnresolvedClass : | 430 case JVM_CONSTANT_UnresolvedClass : |
431 // Patching a class means pre-resolving it. | 431 // Patching a class means pre-resolving it. |
432 // The name in the constant pool is ignored. | 432 // The name in the constant pool is ignored. |
433 if (patch->klass() == SystemDictionary::class_klass()) { // %%% java_lang_Class::is_instance | 433 if (patch->klass() == SystemDictionary::Class_klass()) { // %%% java_lang_Class::is_instance |
434 guarantee_property(!java_lang_Class::is_primitive(patch()), | 434 guarantee_property(!java_lang_Class::is_primitive(patch()), |
435 "Illegal class patch at %d in class file %s", | 435 "Illegal class patch at %d in class file %s", |
436 index, CHECK); | 436 index, CHECK); |
437 cp->klass_at_put(index, java_lang_Class::as_klassOop(patch())); | 437 cp->klass_at_put(index, java_lang_Class::as_klassOop(patch())); |
438 } else { | 438 } else { |
641 break; | 641 break; |
642 case T_BYTE: case T_CHAR: case T_SHORT: case T_BOOLEAN: case T_INT: | 642 case T_BYTE: case T_CHAR: case T_SHORT: case T_BOOLEAN: case T_INT: |
643 guarantee_property(value_type.is_int(), "Inconsistent constant value type in class file %s", CHECK); | 643 guarantee_property(value_type.is_int(), "Inconsistent constant value type in class file %s", CHECK); |
644 break; | 644 break; |
645 case T_OBJECT: | 645 case T_OBJECT: |
646 guarantee_property((cp->symbol_at(signature_index)->equals("Ljava/lang/String;", 18) | 646 guarantee_property((cp->symbol_at(signature_index)->equals("Ljava/lang/String;") |
647 && (value_type.is_string() || value_type.is_unresolved_string())), | 647 && (value_type.is_string() || value_type.is_unresolved_string())), |
648 "Bad string initial value in class file %s", CHECK); | 648 "Bad string initial value in class file %s", CHECK); |
649 break; | 649 break; |
650 default: | 650 default: |
651 classfile_parse_error( | 651 classfile_parse_error( |
1716 * sure that the oops can pass verification when this field is set. | 1716 * sure that the oops can pass verification when this field is set. |
1717 */ | 1717 */ |
1718 m->set_exception_table(exception_handlers()); | 1718 m->set_exception_table(exception_handlers()); |
1719 | 1719 |
1720 // Copy byte codes | 1720 // Copy byte codes |
1721 if (code_length > 0) { | 1721 m->set_code(code_start); |
1722 memcpy(m->code_base(), code_start, code_length); | |
1723 } | |
1724 | 1722 |
1725 // Copy line number table | 1723 // Copy line number table |
1726 if (linenumber_table != NULL) { | 1724 if (linenumber_table != NULL) { |
1727 memcpy(m->compressed_linenumber_table(), | 1725 memcpy(m->compressed_linenumber_table(), |
1728 linenumber_table->buffer(), linenumber_table_length); | 1726 linenumber_table->buffer(), linenumber_table_length); |
3469 } | 3467 } |
3470 assert(f == k->has_finalizer(), "inconsistent has_finalizer"); | 3468 assert(f == k->has_finalizer(), "inconsistent has_finalizer"); |
3471 #endif | 3469 #endif |
3472 | 3470 |
3473 // Check if this klass supports the java.lang.Cloneable interface | 3471 // Check if this klass supports the java.lang.Cloneable interface |
3474 if (SystemDictionary::cloneable_klass_loaded()) { | 3472 if (SystemDictionary::Cloneable_klass_loaded()) { |
3475 if (k->is_subtype_of(SystemDictionary::cloneable_klass())) { | 3473 if (k->is_subtype_of(SystemDictionary::Cloneable_klass())) { |
3476 k->set_is_cloneable(); | 3474 k->set_is_cloneable(); |
3477 } | 3475 } |
3478 } | 3476 } |
3479 | 3477 |
3480 // Check if this klass has a vanilla default constructor | 3478 // Check if this klass has a vanilla default constructor |
4176 p = tmp_p; | 4174 p = tmp_p; |
4177 last_is_slash = false; | 4175 last_is_slash = false; |
4178 // Check if ch is Java identifier start or is Java identifier part | 4176 // Check if ch is Java identifier start or is Java identifier part |
4179 // 4672820: call java.lang.Character methods directly without generating separate tables. | 4177 // 4672820: call java.lang.Character methods directly without generating separate tables. |
4180 EXCEPTION_MARK; | 4178 EXCEPTION_MARK; |
4181 instanceKlassHandle klass (THREAD, SystemDictionary::char_klass()); | 4179 instanceKlassHandle klass (THREAD, SystemDictionary::Character_klass()); |
4182 | 4180 |
4183 // return value | 4181 // return value |
4184 JavaValue result(T_BOOLEAN); | 4182 JavaValue result(T_BOOLEAN); |
4185 // Set up the arguments to isJavaIdentifierStart and isJavaIdentifierPart | 4183 // Set up the arguments to isJavaIdentifierStart and isJavaIdentifierPart |
4186 JavaCallArguments args; | 4184 JavaCallArguments args; |