Revision: 6804
Author: [email protected]
Date: Wed Feb 16 01:11:23 2011
Log: Merge revisions 6611, 6795, 6797 to the 3.0 branch

I added 6611 to this patch since it makes the merge a much cleaner. I
can make another patch only merging 6795+6797, but this will include a
bunch of hand merged stuff that I would love to avoid giving our test
coverage for the 3.0 branch.

Review URL: http://codereview.chromium.org/6480070
http://code.google.com/p/v8/source/detail?r=6804

Added:
 /branches/3.0/test/mjsunit/regress/regress-1156.js
Modified:
 /branches/3.0/src/arm/deoptimizer-arm.cc
 /branches/3.0/src/arm/lithium-codegen-arm.cc
 /branches/3.0/src/assembler.cc
 /branches/3.0/src/assembler.h
 /branches/3.0/src/disassembler.cc
 /branches/3.0/src/full-codegen.cc
 /branches/3.0/src/ia32/assembler-ia32.cc
 /branches/3.0/src/ia32/assembler-ia32.h
 /branches/3.0/src/ia32/deoptimizer-ia32.cc
 /branches/3.0/src/ia32/lithium-codegen-ia32.cc
 /branches/3.0/src/objects-inl.h
 /branches/3.0/src/objects.cc
 /branches/3.0/src/objects.h
 /branches/3.0/src/runtime.cc
 /branches/3.0/src/safepoint-table.cc
 /branches/3.0/src/version.cc
 /branches/3.0/src/x64/deoptimizer-x64.cc
 /branches/3.0/src/x64/lithium-codegen-x64.cc

=======================================
--- /dev/null
+++ /branches/3.0/test/mjsunit/regress/regress-1156.js Wed Feb 16 01:11:23 2011
@@ -0,0 +1,49 @@
+// Copyright 2011 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --allow-natives-syntax --nouse-inlining
+
+// Test that we do not crash we invoke builtins from optimized code that
+// is then deoptimized.
+
+function foo(a) {
+  delete a[1];
+  delete a[2];
+  delete a[3];
+  delete a[4];
+  delete a[5];
+  return void 0;
+}
+
+function call_and_deopt() {
+  var b = [1,2,3];
+  foo(b);
+  foo(b);
+  %DeoptimizeFunction(foo);
+}
+
+call_and_deopt();
=======================================
--- /branches/3.0/src/arm/deoptimizer-arm.cc    Wed Feb  2 07:49:30 2011
+++ /branches/3.0/src/arm/deoptimizer-arm.cc    Wed Feb 16 01:11:23 2011
@@ -97,7 +97,7 @@
 #ifdef DEBUG
   // Destroy the code which is not supposed to be run again.
   int instructions =
- (code->safepoint_table_start() - last_pc_offset) / Assembler::kInstrSize; + (code->safepoint_table_offset() - last_pc_offset) / Assembler::kInstrSize;
   CodePatcher destroyer(code->instruction_start() + last_pc_offset,
                         instructions);
   for (int x = 0; x < instructions; x++) {
=======================================
--- /branches/3.0/src/arm/lithium-codegen-arm.cc        Wed Feb  2 07:49:30 2011
+++ /branches/3.0/src/arm/lithium-codegen-arm.cc        Wed Feb 16 01:11:23 2011
@@ -223,7 +223,7 @@
 void LCodeGen::FinishCode(Handle<Code> code) {
   ASSERT(is_done());
   code->set_stack_slots(StackSlotCount());
-  code->set_safepoint_table_start(safepoints_.GetCodeOffset());
+  code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
   PopulateDeoptimizationData(code);
 }

=======================================
--- /branches/3.0/src/assembler.cc      Wed Feb  2 08:14:28 2011
+++ /branches/3.0/src/assembler.cc      Wed Feb 16 01:11:23 2011
@@ -68,7 +68,7 @@
 const double DoubleConstant::one_half = 0.5;
 const double DoubleConstant::minus_zero = -0.0;
 const double DoubleConstant::negative_infinity = -V8_INFINITY;
-
+const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING";

// -----------------------------------------------------------------------------
 // Implementation of Label
=======================================
--- /branches/3.0/src/assembler.h       Fri Jan 28 00:04:38 2011
+++ /branches/3.0/src/assembler.h       Wed Feb 16 01:11:23 2011
@@ -178,6 +178,12 @@
   // invalid/uninitialized position value.
   static const int kNoPosition = -1;

+  // This string is used to add padding comments to the reloc info in cases
+  // where we are not sure to have enough space for patching in during
+ // lazy deoptimization. This is the case if we have indirect calls for which
+  // we do not normally record relocation info.
+  static const char* kFillerCommentString;
+
   enum Mode {
// Please note the order is important (see IsCodeTarget, IsGCRelocMode). CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor.
=======================================
--- /branches/3.0/src/disassembler.cc   Mon Jan 10 00:15:37 2011
+++ /branches/3.0/src/disassembler.cc   Wed Feb 16 01:11:23 2011
@@ -313,12 +313,12 @@
 // Called by Code::CodePrint.
 void Disassembler::Decode(FILE* f, Code* code) {
   int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION)
-      ? static_cast<int>(code->safepoint_table_start())
+      ? static_cast<int>(code->safepoint_table_offset())
       : code->instruction_size();
   // If there might be a stack check table, stop before reaching it.
   if (code->kind() == Code::FUNCTION) {
     decode_size =
- Min(decode_size, static_cast<int>(code->stack_check_table_start())); + Min(decode_size, static_cast<int>(code->stack_check_table_offset()));
   }

   byte* begin = code->instruction_start();
=======================================
--- /branches/3.0/src/full-codegen.cc   Wed Feb  9 23:21:03 2011
+++ /branches/3.0/src/full-codegen.cc   Wed Feb 16 01:11:23 2011
@@ -304,7 +304,7 @@
   cgen.PopulateDeoptimizationData(code);
   code->set_has_deoptimization_support(info->HasDeoptimizationSupport());
   code->set_allow_osr_at_loop_nesting_level(0);
-  code->set_stack_check_table_start(table_offset);
+  code->set_stack_check_table_offset(table_offset);
   CodeGenerator::PrintCode(code, info);
   info->SetCode(code);  // may be an empty handle.
 #ifdef ENABLE_GDB_JIT_INTERFACE
=======================================
--- /branches/3.0/src/ia32/assembler-ia32.cc    Mon Jan 17 04:24:25 2011
+++ /branches/3.0/src/ia32/assembler-ia32.cc    Wed Feb 16 01:11:23 2011
@@ -2594,8 +2594,8 @@
 }


-void Assembler::RecordComment(const char* msg) {
-  if (FLAG_code_comments) {
+void Assembler::RecordComment(const char* msg, bool force) {
+  if (FLAG_code_comments || force) {
     EnsureSpace ensure_space(this);
     RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
   }
=======================================
--- /branches/3.0/src/ia32/assembler-ia32.h     Mon Jan 17 04:24:25 2011
+++ /branches/3.0/src/ia32/assembler-ia32.h     Wed Feb 16 01:11:23 2011
@@ -951,8 +951,9 @@
   void RecordDebugBreakSlot();

   // Record a comment relocation entry that can be used by a disassembler.
-  // Use --code-comments to enable.
-  void RecordComment(const char* msg);
+ // Use --code-comments to enable, or provide "force = true" flag to always
+  // write a comment.
+  void RecordComment(const char* msg, bool force = false);

   // Writes a single byte or word of data in the code stream.  Used for
   // inline tables, e.g., jump-tables.
=======================================
--- /branches/3.0/src/ia32/deoptimizer-ia32.cc  Wed Feb  2 07:49:30 2011
+++ /branches/3.0/src/ia32/deoptimizer-ia32.cc  Wed Feb 16 01:11:23 2011
@@ -43,6 +43,16 @@
 int Deoptimizer::patch_size() {
   return Assembler::kCallInstructionLength;
 }
+
+
+static void ZapCodeRange(Address start, Address end) {
+#ifdef DEBUG
+  ASSERT(start <= end);
+  int size = end - start;
+  CodePatcher destroyer(start, size);
+  while (size-- > 0) destroyer.masm()->int3();
+#endif
+}


 void Deoptimizer::DeoptimizeFunction(JSFunction* function) {
@@ -52,90 +62,63 @@

   // Get the optimized code.
   Code* code = function->code();
-
-  // For each return after a safepoint insert a absolute call to the
-  // corresponding deoptimization entry.
-  unsigned last_pc_offset = 0;
-  SafepointTable table(function->code());
+  Address code_start_address = code->instruction_start();

   // We will overwrite the code's relocation info in-place. Relocation info
- // is written backward. The relocation info is the payload of a byte array.
-  // Later on we will align this at the start of the byte array and create
-  // a trash byte array of the remaining space.
+  // is written backward. The relocation info is the payload of a byte
+  // array.  Later on we will slide this to the start of the byte array and
+  // create a filler object in the remaining space.
   ByteArray* reloc_info = code->relocation_info();
-  Address end_address = reloc_info->address() + reloc_info->Size();
- RelocInfoWriter reloc_info_writer(end_address, code->instruction_start());
-
-  for (unsigned i = 0; i < table.length(); i++) {
-    unsigned pc_offset = table.GetPcOffset(i);
+  Address reloc_end_address = reloc_info->address() + reloc_info->Size();
+  RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address);
+
+  // For each return after a safepoint insert a call to the corresponding
+ // deoptimization entry. Since the call is a relative encoding, write new
+  // reloc info.  We do not need any of the existing reloc info because the
+  // existing code will not be used again (we zap it in debug builds).
+  SafepointTable table(code);
+  Address prev_address = code_start_address;
+  for (unsigned i = 0; i < table.length(); ++i) {
+    Address curr_address = code_start_address + table.GetPcOffset(i);
+    ASSERT_GE(curr_address, prev_address);
+    ZapCodeRange(prev_address, curr_address);
+
     SafepointEntry safepoint_entry = table.GetEntry(i);
     int deoptimization_index = safepoint_entry.deoptimization_index();
-    int gap_code_size = safepoint_entry.gap_code_size();
-#ifdef DEBUG
-    // Destroy the code which is not supposed to run again.
-    unsigned instructions = pc_offset - last_pc_offset;
-    CodePatcher destroyer(code->instruction_start() + last_pc_offset,
-                          instructions);
-    for (unsigned i = 0; i < instructions; i++) {
-      destroyer.masm()->int3();
-    }
-#endif
-    last_pc_offset = pc_offset;
     if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
-      last_pc_offset += gap_code_size;
-      Address call_pc = code->instruction_start() + last_pc_offset;
-      CodePatcher patcher(call_pc, patch_size());
-      Address entry = GetDeoptimizationEntry(deoptimization_index, LAZY);
-      patcher.masm()->call(entry, RelocInfo::NONE);
-      last_pc_offset += patch_size();
-      RelocInfo rinfo(call_pc + 1, RelocInfo::RUNTIME_ENTRY,
-                      reinterpret_cast<intptr_t>(entry));
+ // The gap code is needed to get to the state expected at the bailout.
+      curr_address += safepoint_entry.gap_code_size();
+
+      CodePatcher patcher(curr_address, patch_size());
+ Address deopt_entry = GetDeoptimizationEntry(deoptimization_index, LAZY);
+      patcher.masm()->call(deopt_entry, RelocInfo::NONE);
+
+      // We use RUNTIME_ENTRY for deoptimization bailouts.
+      RelocInfo rinfo(curr_address + 1,  // 1 after the call opcode.
+                      RelocInfo::RUNTIME_ENTRY,
+                      reinterpret_cast<intptr_t>(deopt_entry));
       reloc_info_writer.Write(&rinfo);
-    }
-  }
-#ifdef DEBUG
-  // Destroy the code which is not supposed to run again.
-  unsigned instructions = code->safepoint_table_start() - last_pc_offset;
-  CodePatcher destroyer(code->instruction_start() + last_pc_offset,
-                        instructions);
-  for (unsigned i = 0; i < instructions; i++) {
-    destroyer.masm()->int3();
-  }
-#endif
+      ASSERT_GE(reloc_info_writer.pos(),
+                reloc_info->address() + ByteArray::kHeaderSize);
+      curr_address += patch_size();
+    }
+    prev_address = curr_address;
+  }
+  ZapCodeRange(prev_address,
+               code_start_address + code->safepoint_table_offset());

   // Move the relocation info to the beginning of the byte array.
-  int reloc_size = end_address - reloc_info_writer.pos();
-  memmove(code->relocation_start(), reloc_info_writer.pos(), reloc_size);
+  int new_reloc_size = reloc_end_address - reloc_info_writer.pos();
+ memmove(code->relocation_start(), reloc_info_writer.pos(), new_reloc_size);

   // The relocation info is in place, update the size.
-  reloc_info->set_length(reloc_size);
+  reloc_info->set_length(new_reloc_size);

   // Handle the junk part after the new relocation info. We will create
// a non-live object in the extra space at the end of the former reloc info.
-  Address junk = reloc_info->address() + reloc_info->Size();
-  ASSERT(junk <= end_address);
-
-  if (end_address - junk <= ByteArray::kHeaderSize) {
-    // We get in here if there is not enough space for a ByteArray.
-
-    // Both addresses are kPointerSize alligned.
-    CHECK_EQ((end_address - junk) % 4, 0);
-    Map* filler_map = Heap::one_pointer_filler_map();
-    while (junk < end_address) {
-      HeapObject::FromAddress(junk)->set_map(filler_map);
-      junk += kPointerSize;
-    }
-  } else {
-    int size = end_address - junk;
-    // Since the reloc_end address and junk are both alligned, we shouild,
-    // never have junk which is not a multipla of kPointerSize.
-    CHECK_EQ(size % kPointerSize, 0);
-    CHECK_GT(size, 0);
-    HeapObject* junk_object = HeapObject::FromAddress(junk);
-    junk_object->set_map(Heap::byte_array_map());
-    int length = ByteArray::LengthFor(end_address - junk);
-    ByteArray::cast(junk_object)->set_length(length);
-  }
+  Address junk_address = reloc_info->address() + reloc_info->Size();
+  ASSERT(junk_address <= reloc_end_address);
+ Heap::CreateFillerObjectAt(junk_address, reloc_end_address - junk_address);

   // Add the deoptimizing code to the list.
   DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
=======================================
--- /branches/3.0/src/ia32/lithium-codegen-ia32.cc      Wed Feb  9 23:21:03 2011
+++ /branches/3.0/src/ia32/lithium-codegen-ia32.cc      Wed Feb 16 01:11:23 2011
@@ -43,13 +43,20 @@
  public:
   SafepointGenerator(LCodeGen* codegen,
                      LPointerMap* pointers,
-                     int deoptimization_index)
+                     int deoptimization_index,
+                     bool ensure_reloc_space = false)
       : codegen_(codegen),
         pointers_(pointers),
-        deoptimization_index_(deoptimization_index) { }
+        deoptimization_index_(deoptimization_index),
+        ensure_reloc_space_(ensure_reloc_space) { }
   virtual ~SafepointGenerator() { }

   virtual void Generate() {
+    // Ensure that we have enough space in the reloc info to patch
+    // this with calls when doing deoptimization.
+    if (ensure_reloc_space_) {
+ codegen_->masm()->RecordComment(RelocInfo::kFillerCommentString, true);
+    }
     codegen_->RecordSafepoint(pointers_, deoptimization_index_);
   }

@@ -57,6 +64,7 @@
   LCodeGen* codegen_;
   LPointerMap* pointers_;
   int deoptimization_index_;
+  bool ensure_reloc_space_;
 };


@@ -77,7 +85,7 @@
 void LCodeGen::FinishCode(Handle<Code> code) {
   ASSERT(is_done());
   code->set_stack_slots(StackSlotCount());
-  code->set_safepoint_table_start(safepoints_.GetCodeOffset());
+  code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
   PopulateDeoptimizationData(code);
 }

@@ -2146,7 +2154,8 @@
   RegisterEnvironmentForDeoptimization(env);
   SafepointGenerator safepoint_generator(this,
                                          pointers,
-                                         env->deoptimization_index());
+                                         env->deoptimization_index(),
+                                         true);
   ASSERT(receiver.is(eax));
   v8::internal::ParameterCount actual(eax);
   __ InvokeFunction(edi, actual, CALL_FUNCTION, &safepoint_generator);
@@ -2204,6 +2213,10 @@
   if (*function == *graph()->info()->closure()) {
     __ CallSelf();
   } else {
+    // This is an indirect call and will not be recorded in the reloc info.
+    // Add a comment to the reloc info in case we need to patch this during
+    // deoptimization.
+    __ RecordComment(RelocInfo::kFillerCommentString, true);
     __ call(FieldOperand(edi, JSFunction::kCodeEntryOffset));
   }

@@ -3584,9 +3597,14 @@
   LEnvironment* env = instr->deoptimization_environment();
   RecordPosition(pointers->position());
   RegisterEnvironmentForDeoptimization(env);
+  // Create safepoint generator that will also ensure enough space in the
+  // reloc info for patching in deoptimization (since this is invoking a
+  // builtin)
+
   SafepointGenerator safepoint_generator(this,
                                          pointers,
-                                         env->deoptimization_index());
+                                         env->deoptimization_index(),
+                                         true);
   __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION, &safepoint_generator);
 }

=======================================
--- /branches/3.0/src/objects-inl.h     Wed Feb  2 07:15:04 2011
+++ /branches/3.0/src/objects-inl.h     Wed Feb 16 01:11:23 2011
@@ -2510,29 +2510,29 @@
 }


-unsigned Code::safepoint_table_start() {
+unsigned Code::safepoint_table_offset() {
   ASSERT(kind() == OPTIMIZED_FUNCTION);
-  return READ_UINT32_FIELD(this, kSafepointTableStartOffset);
+  return READ_UINT32_FIELD(this, kSafepointTableOffsetOffset);
 }


-void Code::set_safepoint_table_start(unsigned offset) {
+void Code::set_safepoint_table_offset(unsigned offset) {
   ASSERT(kind() == OPTIMIZED_FUNCTION);
   ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize)));
-  WRITE_UINT32_FIELD(this, kSafepointTableStartOffset, offset);
+  WRITE_UINT32_FIELD(this, kSafepointTableOffsetOffset, offset);
 }


-unsigned Code::stack_check_table_start() {
+unsigned Code::stack_check_table_offset() {
   ASSERT(kind() == FUNCTION);
-  return READ_UINT32_FIELD(this, kStackCheckTableStartOffset);
+  return READ_UINT32_FIELD(this, kStackCheckTableOffsetOffset);
 }


-void Code::set_stack_check_table_start(unsigned offset) {
+void Code::set_stack_check_table_offset(unsigned offset) {
   ASSERT(kind() == FUNCTION);
   ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize)));
-  WRITE_UINT32_FIELD(this, kStackCheckTableStartOffset, offset);
+  WRITE_UINT32_FIELD(this, kStackCheckTableOffsetOffset, offset);
 }


=======================================
--- /branches/3.0/src/objects.cc        Thu Feb 10 01:51:51 2011
+++ /branches/3.0/src/objects.cc        Wed Feb 16 01:11:23 2011
@@ -6015,7 +6015,7 @@
 void Code::SetNoStackCheckTable() {
   // Indicate the absence of a stack-check table by a table start after the
   // end of the instructions.  Table start must be aligned, so round up.
-  set_stack_check_table_start(RoundUp(instruction_size(), kIntSize));
+  set_stack_check_table_offset(RoundUp(instruction_size(), kIntSize));
 }


@@ -6292,7 +6292,7 @@
     }
     PrintF(out, "\n");
   } else if (kind() == FUNCTION) {
-    unsigned offset = stack_check_table_start();
+    unsigned offset = stack_check_table_offset();
     // If there is no stack check table, the "table start" will at or after
     // (due to alignment) the end of the instruction stream.
     if (static_cast<int>(offset) < instruction_size()) {
=======================================
--- /branches/3.0/src/objects.h Wed Feb  9 23:21:03 2011
+++ /branches/3.0/src/objects.h Wed Feb 16 01:11:23 2011
@@ -3276,13 +3276,13 @@

   // [safepoint_table_start]: For kind OPTIMIZED_CODE, the offset in
   // the instruction stream where the safepoint table starts.
-  inline unsigned safepoint_table_start();
-  inline void set_safepoint_table_start(unsigned offset);
+  inline unsigned safepoint_table_offset();
+  inline void set_safepoint_table_offset(unsigned offset);

   // [stack_check_table_start]: For kind FUNCTION, the offset in the
   // instruction stream where the stack check table starts.
-  inline unsigned stack_check_table_start();
-  inline void set_stack_check_table_start(unsigned offset);
+  inline unsigned stack_check_table_offset();
+  inline void set_stack_check_table_offset(unsigned offset);

   // [check type]: For kind CALL_IC, tells how to check if the
   // receiver is valid for the given call.
@@ -3446,8 +3446,8 @@
   static const int kAllowOSRAtLoopNestingLevelOffset =
       kHasDeoptimizationSupportOffset + 1;

- static const int kSafepointTableStartOffset = kStackSlotsOffset + kIntSize; - static const int kStackCheckTableStartOffset = kStackSlotsOffset + kIntSize; + static const int kSafepointTableOffsetOffset = kStackSlotsOffset + kIntSize; + static const int kStackCheckTableOffsetOffset = kStackSlotsOffset + kIntSize;

   // Flags layout.
   static const int kFlagsICStateShift        = 0;
=======================================
--- /branches/3.0/src/runtime.cc        Thu Feb 10 01:51:51 2011
+++ /branches/3.0/src/runtime.cc        Wed Feb 16 01:11:23 2011
@@ -7037,7 +7037,7 @@
     // the AST id matching the PC.
     Address start = unoptimized->instruction_start();
     unsigned target_pc_offset = static_cast<unsigned>(frame->pc() - start);
-    Address table_cursor = start + unoptimized->stack_check_table_start();
+    Address table_cursor = start + unoptimized->stack_check_table_offset();
     uint32_t table_length = Memory::uint32_at(table_cursor);
     table_cursor += kIntSize;
     for (unsigned i = 0; i < table_length; ++i) {
=======================================
--- /branches/3.0/src/safepoint-table.cc        Wed Feb  2 07:49:30 2011
+++ /branches/3.0/src/safepoint-table.cc        Wed Feb 16 01:11:23 2011
@@ -58,7 +58,7 @@
 SafepointTable::SafepointTable(Code* code) {
   ASSERT(code->kind() == Code::OPTIMIZED_FUNCTION);
   code_ = code;
- Address header = code->instruction_start() + code->safepoint_table_start(); + Address header = code->instruction_start() + code->safepoint_table_offset();
   length_ = Memory::uint32_at(header + kLengthOffset);
   entry_size_ = Memory::uint32_at(header + kEntrySizeOffset);
   pc_and_deoptimization_indexes_ = header + kHeaderSize;
=======================================
--- /branches/3.0/src/version.cc        Fri Feb 11 05:22:38 2011
+++ /branches/3.0/src/version.cc        Wed Feb 16 01:11:23 2011
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     0
 #define BUILD_NUMBER      12
-#define PATCH_LEVEL       18
+#define PATCH_LEVEL       19
 #define CANDIDATE_VERSION false

 // Define SONAME to have the SCons build the put a specific SONAME into the
=======================================
--- /branches/3.0/src/x64/deoptimizer-x64.cc    Wed Feb  2 07:49:30 2011
+++ /branches/3.0/src/x64/deoptimizer-x64.cc    Wed Feb 16 01:11:23 2011
@@ -88,8 +88,8 @@
   }
 #ifdef DEBUG
   // Destroy the code which is not supposed to run again.
-  CHECK(code->safepoint_table_start() >= last_pc_offset);
-  unsigned instructions = code->safepoint_table_start() - last_pc_offset;
+  CHECK(code->safepoint_table_offset() >= last_pc_offset);
+  unsigned instructions = code->safepoint_table_offset() - last_pc_offset;
   CodePatcher destroyer(code->instruction_start() + last_pc_offset,
                         instructions);
   for (unsigned i = 0; i < instructions; i++) {
=======================================
--- /branches/3.0/src/x64/lithium-codegen-x64.cc        Wed Feb  9 23:21:03 2011
+++ /branches/3.0/src/x64/lithium-codegen-x64.cc        Wed Feb 16 01:11:23 2011
@@ -53,7 +53,7 @@
 void LCodeGen::FinishCode(Handle<Code> code) {
   ASSERT(is_done());
   code->set_stack_slots(StackSlotCount());
-  code->set_safepoint_table_start(safepoints_.GetCodeOffset());
+  code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
   PopulateDeoptimizationData(code);
 }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to