| Index: src/x64/macro-assembler-x64.cc
|
| ===================================================================
|
| --- src/x64/macro-assembler-x64.cc (revision 8462)
|
| +++ src/x64/macro-assembler-x64.cc (working copy)
|
| @@ -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.");
|
| }
|
| }
|
|
|
|
|