Version 3.4.8

Ensure 16-byte stack alignment on Solaris (issue 1505).

Fix "illegal access" when calling parseInt with a radix that is not a smi. (issue 1246).


git-svn-id: http://v8.googlecode.com/svn/trunk@8466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 1d375e1..7c8a366 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -3628,14 +3628,17 @@
     movq(dst, rsi);
   }
 
-  // We should not have found a 'with' context by walking the context chain
-  // (i.e., the static scope chain and runtime context chain do not agree).
-  // A variable occurring in such a scope should have slot type LOOKUP and
-  // not CONTEXT.
+  // We should not have found a with or catch context by walking the context
+  // chain (i.e., the static scope chain and runtime context chain do not
+  // agree).  A variable occurring in such a scope should have slot type
+  // LOOKUP and not CONTEXT.
   if (emit_debug_code()) {
-    cmpq(dst, Operand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
-    Check(equal, "Yo dawg, I heard you liked function contexts "
-                 "so I put function contexts in all your contexts");
+    CompareRoot(FieldOperand(dst, HeapObject::kMapOffset),
+                Heap::kWithContextMapRootIndex);
+    Check(not_equal, "Variable resolved to with context.");
+    CompareRoot(FieldOperand(dst, HeapObject::kMapOffset),
+                Heap::kCatchContextMapRootIndex);
+    Check(not_equal, "Variable resolved to catch context.");
   }
 }