Reviewers: Vitaly,

Message:
Vitaly,

a tiny review for you, if you please.

Description:
Push AccessorInfo data directly if they reside in old space.

Please review this at http://codereview.chromium.org/2840004/show

Affected files:
  M src/ia32/stub-cache-ia32.cc


Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 48d9e674549c08b21db7a3b0fbf454409d00bc7b..bab0435f38968a24e0f5d090a32ac428788ac316 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -816,8 +816,13 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object,
   __ push(other);
   __ push(receiver);  // receiver
   __ push(reg);  // holder
-  __ mov(other, Immediate(callback_handle));
-  __ push(FieldOperand(other, AccessorInfo::kDataOffset));  // data
+  // Push data from AccessorInfo.
+  if (Heap::InNewSpace(callback_handle->data())) {
+    __ mov(other, Immediate(callback_handle));
+    __ push(FieldOperand(other, AccessorInfo::kDataOffset));
+  } else {
+    __ push(Immediate(Handle<Object>(callback_handle->data())));
+  }
   __ push(name_reg);  // name
   // Save a pointer to where we pushed the arguments pointer.
   // This will be passed as the const AccessorInfo& to the C++ callback.


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

Reply via email to