~ubuntu-branches/ubuntu/lucid/openjdk-6/lucid-updates

« back to all changes in this revision

Viewing changes to ports/hotspot/src/share/vm/shark/sharkFunction.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-10 11:19:19 UTC
  • mfrom: (3.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100310111919-o4i1uzfhj04xs0e7
Tags: 6b18~pre2-1
* Update IcedTea build infrastructure (20100310).
* Disable building the plugin the plugin on alpha (borked xulrunner
  packaging using binary indep packages).
* Use a two stage build on alpha.
* Add note about the reparenting WM workaround. Closes: #573026.
* Prefer Sazanami instead of Kochi for Japanese fonts (Hideki Yamane).
  Closes: #572511.
* openjdk-6-doc: Don't compress package-list files. Closes: #567899.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
using namespace llvm;
30
30
 
31
 
void SharkFunction::initialize(const char *name)
32
 
{
 
31
void SharkFunction::initialize(const char *name) {
33
32
  // Create the function
34
33
  _function = Function::Create(
35
34
    entry_point_type(),
98
97
      SharkTopLevelBlock *locker =
99
98
        new SharkTopLevelBlock(this, start_block->ciblock());
100
99
      locker->add_incoming(entry_state);
101
 
    
 
100
 
102
101
      set_block_insertion_point(start_block->entry_block());
103
102
      locker->acquire_method_lock();
104
 
    
 
103
 
105
104
      entry_state = locker->current_state();
106
105
    }
107
106
  }
134
133
      _bci(block->bci()),
135
134
      _state(block->current_state()->copy()),
136
135
      _check_block(builder()->GetInsertBlock()),
137
 
      _continue_block(function()->CreateBlock("not_zero"))
138
 
  {
 
136
      _continue_block(function()->CreateBlock("not_zero")) {
139
137
    builder()->SetInsertPoint(continue_block());
140
138
  }
141
139
 
146
144
  SharkState*         _state;
147
145
  BasicBlock*         _check_block;
148
146
  BasicBlock*         _continue_block;
149
 
  
 
147
 
150
148
 public:
151
 
  SharkTopLevelBlock* block() const
152
 
  {
 
149
  SharkTopLevelBlock* block() const {
153
150
    return _block;
154
151
  }
155
 
  SharkValue* value() const
156
 
  {
 
152
  SharkValue* value() const {
157
153
    return _value;
158
154
  }
159
 
  int bci() const
160
 
  {
 
155
  int bci() const {
161
156
    return _bci;
162
 
  } 
163
 
  SharkState* state() const
164
 
  {
 
157
  }
 
158
  SharkState* state() const {
165
159
    return _state;
166
 
  } 
167
 
  BasicBlock* check_block() const
168
 
  {
 
160
  }
 
161
  BasicBlock* check_block() const {
169
162
    return _check_block;
170
163
  }
171
 
  BasicBlock* continue_block() const
172
 
  {
 
164
  BasicBlock* continue_block() const {
173
165
    return _continue_block;
174
166
  }
175
167
 
176
168
 public:
177
 
  SharkFunction* function() const
178
 
  {
 
169
  SharkFunction* function() const {
179
170
    return block()->function();
180
171
  }
181
172
 
182
173
 public:
183
 
  void process() const
184
 
  {
 
174
  void process() const {
185
175
    builder()->SetInsertPoint(check_block());
186
176
    block()->do_deferred_zero_check(value(), bci(), state(), continue_block());
187
177
  }
188
178
};
189
179
 
190
180
void SharkFunction::add_deferred_zero_check(SharkTopLevelBlock* block,
191
 
                                            SharkValue*         value)
192
 
{
 
181
                                            SharkValue*         value) {
193
182
  deferred_zero_checks()->append(new DeferredZeroCheck(block, value));
194
183
}
195
184
 
196
 
void SharkFunction::do_deferred_zero_checks()
197
 
{
 
185
void SharkFunction::do_deferred_zero_checks() {
198
186
  for (int i = 0; i < deferred_zero_checks()->length(); i++)
199
187
    deferred_zero_checks()->at(i)->process();
200
188
}