| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 ASSERT(object == holder); | 554 ASSERT(object == holder); |
| 555 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 555 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
| 556 if (object->IsJSGlobalProxy()) { | 556 if (object->IsJSGlobalProxy()) { |
| 557 CheckAccessGlobalProxy(reg, scratch, miss); | 557 CheckAccessGlobalProxy(reg, scratch, miss); |
| 558 } | 558 } |
| 559 return reg; | 559 return reg; |
| 560 } | 560 } |
| 561 | 561 |
| 562 | 562 |
| 563 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, | 563 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, |
| 564 Register scratch, | 564 Register scratch, |
| 565 Label* miss) { | 565 Label* miss) { |
| 566 Label same_contexts; | 566 Label same_contexts; |
| 567 | 567 |
| 568 ASSERT(!holder_reg.is(scratch)); | 568 ASSERT(!holder_reg.is(scratch)); |
| 569 | 569 |
| 570 // Load current lexical context from the stack frame. | 570 // Load current lexical context from the stack frame. |
| 571 mov(scratch, Operand(ebp, StandardFrameConstants::kContextOffset)); | 571 mov(scratch, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 572 | 572 |
| 573 // When generating debug code, make sure the lexical context is set. | 573 // When generating debug code, make sure the lexical context is set. |
| 574 if (FLAG_debug_code) { | 574 if (FLAG_debug_code) { |
| 575 cmp(Operand(scratch), Immediate(0)); | 575 cmp(Operand(scratch), Immediate(0)); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 // Indicate that code has changed. | 1043 // Indicate that code has changed. |
| 1044 CPU::FlushICache(address_, size_); | 1044 CPU::FlushICache(address_, size_); |
| 1045 | 1045 |
| 1046 // Check that the code was patched as expected. | 1046 // Check that the code was patched as expected. |
| 1047 ASSERT(masm_.pc_ == address_ + size_); | 1047 ASSERT(masm_.pc_ == address_ + size_); |
| 1048 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1048 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 | 1051 |
| 1052 } } // namespace v8::internal | 1052 } } // namespace v8::internal |
| OLD | NEW |