Mercurial > hg > truffle
comparison src/share/vm/runtime/frame.cpp @ 14392:b5c8a61d7fa0
Merge
author | kvn |
---|---|
date | Fri, 21 Jun 2013 15:56:24 -0700 |
parents | 0f03ff49c720 28e5aed7f3a6 |
children | 583211d4b16b |
comparison
equal
deleted
inserted
replaced
14391:d2907f74462e | 14392:b5c8a61d7fa0 |
---|---|
1006 class CompiledArgumentOopFinder: public SignatureInfo { | 1006 class CompiledArgumentOopFinder: public SignatureInfo { |
1007 protected: | 1007 protected: |
1008 OopClosure* _f; | 1008 OopClosure* _f; |
1009 int _offset; // the current offset, incremented with each argument | 1009 int _offset; // the current offset, incremented with each argument |
1010 bool _has_receiver; // true if the callee has a receiver | 1010 bool _has_receiver; // true if the callee has a receiver |
1011 bool _has_appendix; // true if the call has an appendix | |
1011 frame _fr; | 1012 frame _fr; |
1012 RegisterMap* _reg_map; | 1013 RegisterMap* _reg_map; |
1013 int _arg_size; | 1014 int _arg_size; |
1014 VMRegPair* _regs; // VMReg list of arguments | 1015 VMRegPair* _regs; // VMReg list of arguments |
1015 | 1016 |
1025 oop *loc = _fr.oopmapreg_to_location(reg, _reg_map); | 1026 oop *loc = _fr.oopmapreg_to_location(reg, _reg_map); |
1026 _f->do_oop(loc); | 1027 _f->do_oop(loc); |
1027 } | 1028 } |
1028 | 1029 |
1029 public: | 1030 public: |
1030 CompiledArgumentOopFinder(Symbol* signature, bool has_receiver, OopClosure* f, frame fr, const RegisterMap* reg_map) | 1031 CompiledArgumentOopFinder(Symbol* signature, bool has_receiver, bool has_appendix, OopClosure* f, frame fr, const RegisterMap* reg_map) |
1031 : SignatureInfo(signature) { | 1032 : SignatureInfo(signature) { |
1032 | 1033 |
1033 // initialize CompiledArgumentOopFinder | 1034 // initialize CompiledArgumentOopFinder |
1034 _f = f; | 1035 _f = f; |
1035 _offset = 0; | 1036 _offset = 0; |
1036 _has_receiver = has_receiver; | 1037 _has_receiver = has_receiver; |
1038 _has_appendix = has_appendix; | |
1037 _fr = fr; | 1039 _fr = fr; |
1038 _reg_map = (RegisterMap*)reg_map; | 1040 _reg_map = (RegisterMap*)reg_map; |
1039 _arg_size = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0); | 1041 _arg_size = ArgumentSizeComputer(signature).size() + (has_receiver ? 1 : 0) + (has_appendix ? 1 : 0); |
1040 | 1042 |
1041 int arg_size; | 1043 int arg_size; |
1042 _regs = SharedRuntime::find_callee_arguments(signature, has_receiver, &arg_size); | 1044 _regs = SharedRuntime::find_callee_arguments(signature, has_receiver, has_appendix, &arg_size); |
1043 assert(arg_size == _arg_size, "wrong arg size"); | 1045 assert(arg_size == _arg_size, "wrong arg size"); |
1044 } | 1046 } |
1045 | 1047 |
1046 void oops_do() { | 1048 void oops_do() { |
1047 if (_has_receiver) { | 1049 if (_has_receiver) { |
1048 handle_oop_offset(); | 1050 handle_oop_offset(); |
1049 _offset++; | 1051 _offset++; |
1050 } | 1052 } |
1051 iterate_parameters(); | 1053 iterate_parameters(); |
1054 if (_has_appendix) { | |
1055 handle_oop_offset(); | |
1056 _offset++; | |
1057 } | |
1052 } | 1058 } |
1053 }; | 1059 }; |
1054 | 1060 |
1055 void frame::oops_compiled_arguments_do(Symbol* signature, bool has_receiver, const RegisterMap* reg_map, OopClosure* f) { | 1061 void frame::oops_compiled_arguments_do(Symbol* signature, bool has_receiver, bool has_appendix, const RegisterMap* reg_map, OopClosure* f) { |
1056 ResourceMark rm; | 1062 ResourceMark rm; |
1057 CompiledArgumentOopFinder finder(signature, has_receiver, f, *this, reg_map); | 1063 CompiledArgumentOopFinder finder(signature, has_receiver, has_appendix, f, *this, reg_map); |
1058 finder.oops_do(); | 1064 finder.oops_do(); |
1059 } | 1065 } |
1060 | 1066 |
1061 | 1067 |
1062 // Get receiver out of callers frame, i.e. find parameter 0 in callers | 1068 // Get receiver out of callers frame, i.e. find parameter 0 in callers |