| Index: src/objects.cc.rej
|
| ===================================================================
|
| --- src/objects.cc.rej (revision 5920)
|
| +++ src/objects.cc.rej (working copy)
|
| @@ -1,85 +0,0 @@
|
| ---- src/objects.cc (revision 757)
|
| -+++ src/objects.cc (working copy)
|
| -@@ -5377,19 +5377,26 @@
|
| - Address header = code->instruction_start() + code->safepoint_table_start();
|
| - length_ = Memory::uint32_at(header + kLengthOffset);
|
| - entry_size_ = Memory::uint32_at(header + kEntrySizeOffset);
|
| -- pc_offsets_ = header + kHeaderSize;
|
| -- entries_ = pc_offsets_ + (length_ * kPcOffsetSize);
|
| -+ fixed_entries_ = header + kHeaderSize;
|
| -+ entries_ = fixed_entries_ + (length_ * kFixedEntrySize);
|
| - }
|
| -
|
| -- int size() const { return length_ * (entry_size_ + kPcOffsetSize); }
|
| -+ int size() const { return length_ * (entry_size_ + kFixedEntrySize); }
|
| - unsigned length() const { return length_; }
|
| - unsigned entry_size() const { return entry_size_; }
|
| -
|
| - unsigned GetPcOffset(unsigned index) const {
|
| - ASSERT(index < length_);
|
| -- return Memory::uint32_at(pc_offsets_ + (index * kPcOffsetSize));
|
| -+ return Memory::uint32_at(
|
| -+ fixed_entries_ + kPcOffsetOffset + (index * kFixedEntrySize));
|
| - }
|
| -
|
| -+ unsigned GetBailoutId(unsigned index) const {
|
| -+ ASSERT(index < length_);
|
| -+ return Memory::uint32_at(
|
| -+ fixed_entries_ + kBailoutIdOffset + (index * kFixedEntrySize));
|
| -+ }
|
| -+
|
| - uint8_t* GetEntry(unsigned index) const {
|
| - ASSERT(index < length_);
|
| - return &Memory::uint8_at(entries_ + (index * entry_size_));
|
| -@@ -5408,7 +5415,9 @@
|
| - static const int kEntrySizeOffset = kLengthOffset + kIntSize;
|
| - static const int kHeaderSize = kEntrySizeOffset + kIntSize;
|
| -
|
| -- static const int kPcOffsetSize = kIntSize;
|
| -+ static const int kPcOffsetOffset = 0;
|
| -+ static const int kBailoutIdOffset = kPcOffsetOffset + kIntSize;
|
| -+ static const int kFixedEntrySize = kBailoutIdOffset + kIntSize;
|
| -
|
| - static void PrintBits(uint8_t byte, int digits) {
|
| - ASSERT(digits >= 0 && digits <= kBitsPerByte);
|
| -@@ -5422,7 +5431,7 @@
|
| - unsigned length_;
|
| - unsigned entry_size_;
|
| -
|
| -- Address pc_offsets_;
|
| -+ Address fixed_entries_;
|
| - Address entries_;
|
| - };
|
| -
|
| -@@ -5451,12 +5460,31 @@
|
| - }
|
| -
|
| -
|
| -+void Code::DeoptimizeNow() {
|
| -+ ASSERT(kind() == OPTIMIZED_FUNCTION);
|
| -+
|
| -+ SafepointTable table(this);
|
| -+ for (unsigned i = 0; i < table.length(); i++) {
|
| -+ Address pc = entry() + table.GetPcOffset(i);
|
| -+ unsigned id = table.GetBailoutId(i);
|
| -+ USE(pc);
|
| -+ USE(id);
|
| -+ }
|
| -+
|
| -+ // Done. Update the flags to change the code kind.
|
| -+ Flags flags = static_cast<Flags>(this->flags() & (~kFlagsKindMask));
|
| -+ flags = static_cast<Flags>(flags | (DEOPTIMIZED_FUNCTION << kFlagsKindShift));
|
| -+ ASSERT(kind() == DEOPTIMIZED_FUNCTION);
|
| -+}
|
| -+
|
| -+
|
| - #ifdef ENABLE_DISASSEMBLER
|
| - // Identify kind of code.
|
| - const char* Code::Kind2String(Kind kind) {
|
| - switch (kind) {
|
| - case FUNCTION: return "FUNCTION";
|
| - case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION";
|
| -+ case DEOPTIMIZED_FUNCTION: return "DEOPTIMIZED_FUNCTION";
|
| - case STUB: return "STUB";
|
| - case BUILTIN: return "BUILTIN";
|
| - case LOAD_IC: return "LOAD_IC";
|
|
|