622 // 623 // The name and/or signature might be a "well known" symbol 624 // like "equal" or "()I", in which case there will be no local 625 // re-definition of the symbol. 626 // 627 // The do_class, do_name, and do_signature calls are all used for the 628 // same purpose: Define yet another VM symbol. They could all be merged 629 // into a common 'do_symbol' call, but it seems useful to record our 630 // intentions here about kinds of symbols (class vs. name vs. signature). 631 // 632 // The F_xx is one of the Flags enum; see below. 633 // 634 // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) 635 #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ 636 do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ 637 do_name( hashCode_name, "hashCode") \ 638 do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ 639 do_name( getClass_name, "getClass") \ 640 do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ 641 do_name( clone_name, "clone") \ 642 \ 643 /* Math & StrictMath intrinsics are defined in terms of just a few signatures: */ \ 644 do_class(java_lang_Math, "java/lang/Math") \ 645 do_class(java_lang_StrictMath, "java/lang/StrictMath") \ 646 do_signature(double2_double_signature, "(DD)D") \ 647 do_signature(int2_int_signature, "(II)I") \ 648 do_signature(long2_long_signature, "(JJ)J") \ 649 \ 650 /* here are the math names, all together: */ \ 651 do_name(abs_name,"abs") do_name(sin_name,"sin") do_name(cos_name,"cos") \ 652 do_name(tan_name,"tan") do_name(atan2_name,"atan2") do_name(sqrt_name,"sqrt") \ 653 do_name(log_name,"log") do_name(log10_name,"log10") do_name(pow_name,"pow") \ 654 do_name(exp_name,"exp") do_name(min_name,"min") do_name(max_name,"max") \ 655 \ 656 do_name(addExact_name,"addExact") \ 657 do_name(decrementExact_name,"decrementExact") \ 658 do_name(incrementExact_name,"incrementExact") \ 659 do_name(multiplyExact_name,"multiplyExact") \ 660 do_name(negateExact_name,"negateExact") \ 661 do_name(subtractExact_name,"subtractExact") \ | 622 // 623 // The name and/or signature might be a "well known" symbol 624 // like "equal" or "()I", in which case there will be no local 625 // re-definition of the symbol. 626 // 627 // The do_class, do_name, and do_signature calls are all used for the 628 // same purpose: Define yet another VM symbol. They could all be merged 629 // into a common 'do_symbol' call, but it seems useful to record our 630 // intentions here about kinds of symbols (class vs. name vs. signature). 631 // 632 // The F_xx is one of the Flags enum; see below. 633 // 634 // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) 635 #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ 636 do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ 637 do_name( hashCode_name, "hashCode") \ 638 do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ 639 do_name( getClass_name, "getClass") \ 640 do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ 641 do_name( clone_name, "clone") \ 642 do_intrinsic(_notify, java_lang_Object, notify_name, void_method_signature, F_R) \ 643 do_name( notify_name, "notify") \ 644 do_intrinsic(_notifyAll, java_lang_Object, notifyAll_name, void_method_signature, F_R) \ 645 do_name( notifyAll_name, "notifyAll") \ 646 \ 647 /* Math & StrictMath intrinsics are defined in terms of just a few signatures: */ \ 648 do_class(java_lang_Math, "java/lang/Math") \ 649 do_class(java_lang_StrictMath, "java/lang/StrictMath") \ 650 do_signature(double2_double_signature, "(DD)D") \ 651 do_signature(int2_int_signature, "(II)I") \ 652 do_signature(long2_long_signature, "(JJ)J") \ 653 \ 654 /* here are the math names, all together: */ \ 655 do_name(abs_name,"abs") do_name(sin_name,"sin") do_name(cos_name,"cos") \ 656 do_name(tan_name,"tan") do_name(atan2_name,"atan2") do_name(sqrt_name,"sqrt") \ 657 do_name(log_name,"log") do_name(log10_name,"log10") do_name(pow_name,"pow") \ 658 do_name(exp_name,"exp") do_name(min_name,"min") do_name(max_name,"max") \ 659 \ 660 do_name(addExact_name,"addExact") \ 661 do_name(decrementExact_name,"decrementExact") \ 662 do_name(incrementExact_name,"incrementExact") \ 663 do_name(multiplyExact_name,"multiplyExact") \ 664 do_name(negateExact_name,"negateExact") \ 665 do_name(subtractExact_name,"subtractExact") \ |