Reviewers: Søren Gjesse,

Description:
MIPS: port A collection of context-related refactoring changes.

Ported r8231 (ef01bf0)

There is also a small change to objects-inl.h which is actually for
the FixedDoubleArray change, r8229.

BUG=
TEST=


Please review this at http://codereview.chromium.org/6995127/

Affected files:
  M src/mips/code-stubs-mips.cc
  M src/mips/full-codegen-mips.cc
  M src/objects-inl.h


Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 46e99c4c8c694547eda7ea85c3e243cbbba569b0..971f1bd1934f561c0f6761336e215cbfcda36eee 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -158,7 +158,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
   __ lw(a3, MemOperand(sp, 0));

   // Setup the object header.
-  __ LoadRoot(a2, Heap::kContextMapRootIndex);
+  __ LoadRoot(a2, Heap::kFunctionContextMapRootIndex);
   __ sw(a2, FieldMemOperand(v0, HeapObject::kMapOffset));
   __ li(a2, Operand(Smi::FromInt(length)));
   __ sw(a2, FieldMemOperand(v0, FixedArray::kLengthOffset));
@@ -187,7 +187,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {

   // Need to collect. Call into runtime system.
   __ bind(&gc);
-  __ TailCallRuntime(Runtime::kNewContext, 1, 1);
+  __ TailCallRuntime(Runtime::kNewFunctionContext, 1, 1);
 }


Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index 0978032c5600aa37e997f5c14965c4e6d81915ae..3a7671df915a54a6d583248c3f2b82518bfedb72 100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -189,7 +189,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info) {
       FastNewContextStub stub(heap_slots);
       __ CallStub(&stub);
     } else {
-      __ CallRuntime(Runtime::kNewContext, 1);
+      __ CallRuntime(Runtime::kNewFunctionContext, 1);
     }
     function_in_register = false;
     // Context is returned in both v0 and cp.  It replaces the context
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 204c4cb8291dc5c44564bff41d59521ee9e8eeb7..503e8442af605804d3924253af33fc1a8df5b754 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -890,7 +890,7 @@ MaybeObject* Object::GetProperty(String* key, PropertyAttributes* attributes) {
 #else  // V8_TARGET_ARCH_MIPS
   // Prevent gcc from using load-double (mips ldc1) on (possibly)
   // non-64-bit aligned HeapNumber::value.
-  static inline double read_double_field(HeapNumber* p, int offset) {
+  static inline double read_double_field(void* p, int offset) {
     union conversion {
       double d;
       uint32_t u[2];
@@ -909,7 +909,7 @@ MaybeObject* Object::GetProperty(String* key, PropertyAttributes* attributes) {
 #else  // V8_TARGET_ARCH_MIPS
   // Prevent gcc from using store-double (mips sdc1) on (possibly)
   // non-64-bit aligned HeapNumber::value.
-  static inline void write_double_field(HeapNumber* p, int offset,
+  static inline void write_double_field(void* p, int offset,
                                         double value) {
     union conversion {
       double d;


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

Reply via email to