~ubuntu-branches/ubuntu/saucy/libv8/saucy

« back to all changes in this revision

Viewing changes to src/lithium-allocator.cc

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-04-07 16:26:13 UTC
  • mfrom: (15.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120407162613-dqo1m6w9r3fh8tst
Tags: 3.8.9.16-3
* mipsel build fixes :
  + v8_use_mips_abi_hardfloat=false, this lowers EABI requirements.
  + v8_can_use_fpu_instructions=false, detect if FPU is present.
  + set -Wno-unused-but-set-variable only on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
#define DEFINE_OPERAND_CACHE(name, type)                      \
51
51
  name name::cache[name::kNumCachedOperands];                 \
52
 
  void name::SetupCache() {                                   \
 
52
  void name::SetUpCache() {                                   \
53
53
    for (int i = 0; i < kNumCachedOperands; i++) {            \
54
54
      cache[i].ConvertTo(type, i);                            \
55
55
    }                                                         \
56
56
  }                                                           \
57
57
  static bool name##_initialize() {                           \
58
 
    name::SetupCache();                                       \
 
58
    name::SetUpCache();                                       \
59
59
    return true;                                              \
60
60
  }                                                           \
61
61
  static bool name##_cache_initialized = name##_initialize();
161
161
      next_(NULL),
162
162
      current_interval_(NULL),
163
163
      last_processed_use_(NULL),
164
 
      spill_start_index_(kMaxInt) {
165
 
  spill_operand_ = new LUnallocated(LUnallocated::IGNORE);
166
 
}
 
164
      spill_operand_(new LOperand()),
 
165
      spill_start_index_(kMaxInt) { }
167
166
 
168
167
 
169
168
void LiveRange::set_assigned_register(int reg, RegisterKind register_kind) {
184
183
 
185
184
 
186
185
bool LiveRange::HasAllocatedSpillOperand() const {
187
 
  return spill_operand_ != NULL && !spill_operand_->IsUnallocated();
 
186
  ASSERT(spill_operand_ != NULL);
 
187
  return !spill_operand_->IsIgnored();
188
188
}
189
189
 
190
190
 
191
191
void LiveRange::SetSpillOperand(LOperand* operand) {
192
192
  ASSERT(!operand->IsUnallocated());
193
193
  ASSERT(spill_operand_ != NULL);
194
 
  ASSERT(spill_operand_->IsUnallocated());
 
194
  ASSERT(spill_operand_->IsIgnored());
195
195
  spill_operand_->ConvertTo(operand->kind(), operand->index());
196
196
}
197
197
 
1643
1643
 
1644
1644
 
1645
1645
int LAllocator::max_initial_value_ids() {
1646
 
  return LUnallocated::kMaxVirtualRegisters / 32;
 
1646
  return LUnallocated::kMaxVirtualRegisters / 16;
1647
1647
}
1648
1648
 
1649
1649