Reviewers: fschneider,

Description:
Remove bogus assertion.

[email protected]


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

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/ia32/macro-assembler-ia32.cc
  M src/x64/macro-assembler-x64.cc


Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index a80821f82c4f840b94ba1421df1ac723dd551f71..feb82684eaf52df66c83a4fcdadc39d188d49b0c 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1766,17 +1766,14 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
     mov(dst, esi);
   }

- // 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.
+  // 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.
   if (emit_debug_code()) {
     cmp(FieldOperand(dst, HeapObject::kMapOffset),
         isolate()->factory()->with_context_map());
     Check(not_equal, "Variable resolved to with context.");
-    cmp(FieldOperand(dst, HeapObject::kMapOffset),
-        isolate()->factory()->with_context_map());
-    Check(not_equal, "Variable resolved to catch context.");
   }
 }

Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 7c8a3667e3756f7b3789068f7b7e7e8d7c183026..dbed6e0fda9d173d6224f6d18db6b895107b2200 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -3628,17 +3628,14 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
     movq(dst, rsi);
   }

- // 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.
+  // 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.
   if (emit_debug_code()) {
     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.");
   }
 }



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

Reply via email to