Chromium Code Reviews| Index: src/x64/macro-assembler-x64.cc |
| =================================================================== |
| --- src/x64/macro-assembler-x64.cc (revision 6919) |
| +++ src/x64/macro-assembler-x64.cc (working copy) |
| @@ -2531,10 +2531,22 @@ |
| } |
| // The context may be an intermediate context, not a function context. |
| movq(dst, Operand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX))); |
| - } else { // context is the current function context. |
| - // The context may be an intermediate context, not a function context. |
| - movq(dst, Operand(rsi, Context::SlotOffset(Context::FCONTEXT_INDEX))); |
| + } else { |
| + // Slot is in the current function context. Move it into the |
| + // destination register in case we store into it (the write barrier |
| + // cannot be allowed to destroy the context in esi). |
|
William Hesse
2011/02/24 10:32:15
rsi, not esi.
Søren Thygesen Gjesse
2011/02/24 11:33:18
Done.
|
| + 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. |
| + if (FLAG_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"); |
| + } |
| } |