< prev index next >

src/hotspot/share/interpreter/templateInterpreter.cpp

Print this page




  54     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  55                           "Interpreter");
  56     TemplateInterpreterGenerator g(_code);
  57     // Free the unused memory not occupied by the interpreter and the stubs
  58     _code->deallocate_unused_tail();
  59   }
  60 
  61   if (PrintInterpreter) {
  62     ResourceMark rm;
  63     print();
  64   }
  65 
  66   // initialize dispatch table
  67   _active_table = _normal_table;
  68 }
  69 
  70 //------------------------------------------------------------------------------------------------------------------------
  71 // Implementation of EntryPoint
  72 
  73 EntryPoint::EntryPoint() {
  74   assert(number_of_states == 11, "check the code below");
  75   _entry[btos] = NULL;
  76   _entry[ztos] = NULL;
  77   _entry[ctos] = NULL;
  78   _entry[stos] = NULL;
  79   _entry[atos] = NULL;
  80   _entry[itos] = NULL;
  81   _entry[ltos] = NULL;
  82   _entry[ftos] = NULL;
  83   _entry[dtos] = NULL;
  84   _entry[qtos] = NULL;
  85   _entry[vtos] = NULL;
  86 }
  87 
  88 
  89 EntryPoint::EntryPoint(address bentry, address zentry, address centry, address sentry, address aentry, address ientry, address lentry, address fentry, address dentry, address qentry, address ventry) {
  90   assert(number_of_states == 11, "check the code below");
  91   _entry[btos] = bentry;
  92   _entry[ztos] = zentry;
  93   _entry[ctos] = centry;
  94   _entry[stos] = sentry;
  95   _entry[atos] = aentry;
  96   _entry[itos] = ientry;
  97   _entry[ltos] = lentry;
  98   _entry[ftos] = fentry;
  99   _entry[dtos] = dentry;
 100   _entry[qtos] = qentry;
 101   _entry[vtos] = ventry;
 102 }
 103 
 104 
 105 void EntryPoint::set_entry(TosState state, address entry) {
 106   assert(0 <= state && state < number_of_states, "state out of bounds");
 107   _entry[state] = entry;
 108 }
 109 
 110 
 111 address EntryPoint::entry(TosState state) const {
 112   assert(0 <= state && state < number_of_states, "state out of bounds");
 113   return _entry[state];
 114 }
 115 
 116 
 117 void EntryPoint::print() {
 118   tty->print("[");
 119   for (int i = 0; i < number_of_states; i++) {
 120     if (i > 0) tty->print(", ");


 132   return true;
 133 }
 134 
 135 
 136 //------------------------------------------------------------------------------------------------------------------------
 137 // Implementation of DispatchTable
 138 
 139 EntryPoint DispatchTable::entry(int i) const {
 140   assert(0 <= i && i < length, "index out of bounds");
 141   return
 142     EntryPoint(
 143       _table[btos][i],
 144       _table[ztos][i],
 145       _table[ctos][i],
 146       _table[stos][i],
 147       _table[atos][i],
 148       _table[itos][i],
 149       _table[ltos][i],
 150       _table[ftos][i],
 151       _table[dtos][i],
 152       _table[qtos][i],
 153       _table[vtos][i]
 154     );
 155 }
 156 
 157 
 158 void DispatchTable::set_entry(int i, EntryPoint& entry) {
 159   assert(0 <= i && i < length, "index out of bounds");
 160   assert(number_of_states == 11, "check the code below");
 161   _table[btos][i] = entry.entry(btos);
 162   _table[ztos][i] = entry.entry(ztos);
 163   _table[ctos][i] = entry.entry(ctos);
 164   _table[stos][i] = entry.entry(stos);
 165   _table[atos][i] = entry.entry(atos);
 166   _table[itos][i] = entry.entry(itos);
 167   _table[ltos][i] = entry.entry(ltos);
 168   _table[ftos][i] = entry.entry(ftos);
 169   _table[dtos][i] = entry.entry(dtos);
 170   _table[qtos][i] = entry.entry(qtos);
 171   _table[vtos][i] = entry.entry(vtos);
 172 }
 173 
 174 
 175 bool DispatchTable::operator == (DispatchTable& y) {
 176   int i = length;
 177   while (i-- > 0) {
 178     EntryPoint t = y.entry(i); // for compiler compatibility (BugId 4150096)
 179     if (!(entry(i) == t)) return false;
 180   }
 181   return true;
 182 }
 183 
 184 address    TemplateInterpreter::_remove_activation_entry                    = NULL;
 185 address    TemplateInterpreter::_remove_activation_preserving_args_entry    = NULL;
 186 
 187 
 188 address    TemplateInterpreter::_throw_ArrayIndexOutOfBoundsException_entry = NULL;
 189 address    TemplateInterpreter::_throw_ArrayStoreException_entry            = NULL;
 190 address    TemplateInterpreter::_throw_ArithmeticException_entry            = NULL;




  54     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  55                           "Interpreter");
  56     TemplateInterpreterGenerator g(_code);
  57     // Free the unused memory not occupied by the interpreter and the stubs
  58     _code->deallocate_unused_tail();
  59   }
  60 
  61   if (PrintInterpreter) {
  62     ResourceMark rm;
  63     print();
  64   }
  65 
  66   // initialize dispatch table
  67   _active_table = _normal_table;
  68 }
  69 
  70 //------------------------------------------------------------------------------------------------------------------------
  71 // Implementation of EntryPoint
  72 
  73 EntryPoint::EntryPoint() {
  74   assert(number_of_states == 10 , "check the code below");
  75   _entry[btos] = NULL;
  76   _entry[ztos] = NULL;
  77   _entry[ctos] = NULL;
  78   _entry[stos] = NULL;
  79   _entry[atos] = NULL;
  80   _entry[itos] = NULL;
  81   _entry[ltos] = NULL;
  82   _entry[ftos] = NULL;
  83   _entry[dtos] = NULL;

  84   _entry[vtos] = NULL;
  85 }
  86 
  87 
  88 EntryPoint::EntryPoint(address bentry, address zentry, address centry, address sentry, address aentry, address ientry, address lentry, address fentry, address dentry, address ventry) {
  89   assert(number_of_states == 10, "check the code below");
  90   _entry[btos] = bentry;
  91   _entry[ztos] = zentry;
  92   _entry[ctos] = centry;
  93   _entry[stos] = sentry;
  94   _entry[atos] = aentry;
  95   _entry[itos] = ientry;
  96   _entry[ltos] = lentry;
  97   _entry[ftos] = fentry;
  98   _entry[dtos] = dentry;

  99   _entry[vtos] = ventry;
 100 }
 101 
 102 
 103 void EntryPoint::set_entry(TosState state, address entry) {
 104   assert(0 <= state && state < number_of_states, "state out of bounds");
 105   _entry[state] = entry;
 106 }
 107 
 108 
 109 address EntryPoint::entry(TosState state) const {
 110   assert(0 <= state && state < number_of_states, "state out of bounds");
 111   return _entry[state];
 112 }
 113 
 114 
 115 void EntryPoint::print() {
 116   tty->print("[");
 117   for (int i = 0; i < number_of_states; i++) {
 118     if (i > 0) tty->print(", ");


 130   return true;
 131 }
 132 
 133 
 134 //------------------------------------------------------------------------------------------------------------------------
 135 // Implementation of DispatchTable
 136 
 137 EntryPoint DispatchTable::entry(int i) const {
 138   assert(0 <= i && i < length, "index out of bounds");
 139   return
 140     EntryPoint(
 141       _table[btos][i],
 142       _table[ztos][i],
 143       _table[ctos][i],
 144       _table[stos][i],
 145       _table[atos][i],
 146       _table[itos][i],
 147       _table[ltos][i],
 148       _table[ftos][i],
 149       _table[dtos][i],

 150       _table[vtos][i]
 151     );
 152 }
 153 
 154 
 155 void DispatchTable::set_entry(int i, EntryPoint& entry) {
 156   assert(0 <= i && i < length, "index out of bounds");
 157   assert(number_of_states == 10, "check the code below");
 158   _table[btos][i] = entry.entry(btos);
 159   _table[ztos][i] = entry.entry(ztos);
 160   _table[ctos][i] = entry.entry(ctos);
 161   _table[stos][i] = entry.entry(stos);
 162   _table[atos][i] = entry.entry(atos);
 163   _table[itos][i] = entry.entry(itos);
 164   _table[ltos][i] = entry.entry(ltos);
 165   _table[ftos][i] = entry.entry(ftos);
 166   _table[dtos][i] = entry.entry(dtos);

 167   _table[vtos][i] = entry.entry(vtos);
 168 }
 169 
 170 
 171 bool DispatchTable::operator == (DispatchTable& y) {
 172   int i = length;
 173   while (i-- > 0) {
 174     EntryPoint t = y.entry(i); // for compiler compatibility (BugId 4150096)
 175     if (!(entry(i) == t)) return false;
 176   }
 177   return true;
 178 }
 179 
 180 address    TemplateInterpreter::_remove_activation_entry                    = NULL;
 181 address    TemplateInterpreter::_remove_activation_preserving_args_entry    = NULL;
 182 
 183 
 184 address    TemplateInterpreter::_throw_ArrayIndexOutOfBoundsException_entry = NULL;
 185 address    TemplateInterpreter::_throw_ArrayStoreException_entry            = NULL;
 186 address    TemplateInterpreter::_throw_ArithmeticException_entry            = NULL;


< prev index next >