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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 push(ebp); | 460 push(ebp); |
461 } else { | 461 } else { |
462 ASSERT(try_location == IN_JS_ENTRY); | 462 ASSERT(try_location == IN_JS_ENTRY); |
463 // The parameter pointer is meaningless here and ebp does not | 463 // The parameter pointer is meaningless here and ebp does not |
464 // point to a JS frame. So we save NULL for both pp and ebp. We | 464 // point to a JS frame. So we save NULL for both pp and ebp. We |
465 // expect the code throwing an exception to check ebp before | 465 // expect the code throwing an exception to check ebp before |
466 // dereferencing it to restore the context. | 466 // dereferencing it to restore the context. |
467 push(Immediate(StackHandler::ENTRY)); | 467 push(Immediate(StackHandler::ENTRY)); |
468 push(Immediate(0)); // NULL frame pointer | 468 push(Immediate(0)); // NULL frame pointer |
469 } | 469 } |
470 // Cached TOS. | 470 // Save the current handler as the next handler. |
471 mov(eax, Operand::StaticVariable(ExternalReference(Top::k_handler_address))); | 471 push(Operand::StaticVariable(ExternalReference(Top::k_handler_address))); |
472 // Link this handler. | 472 // Link this handler as the new current one. |
473 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp); | 473 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp); |
474 } | 474 } |
475 | 475 |
476 | 476 |
477 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, | 477 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, |
478 JSObject* holder, Register holder_reg, | 478 JSObject* holder, Register holder_reg, |
479 Register scratch, | 479 Register scratch, |
480 Label* miss) { | 480 Label* miss) { |
481 // Make sure there's no overlap between scratch and the other | 481 // Make sure there's no overlap between scratch and the other |
482 // registers. | 482 // registers. |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 // Indicate that code has changed. | 1040 // Indicate that code has changed. |
1041 CPU::FlushICache(address_, size_); | 1041 CPU::FlushICache(address_, size_); |
1042 | 1042 |
1043 // Check that the code was patched as expected. | 1043 // Check that the code was patched as expected. |
1044 ASSERT(masm_.pc_ == address_ + size_); | 1044 ASSERT(masm_.pc_ == address_ + size_); |
1045 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1045 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1046 } | 1046 } |
1047 | 1047 |
1048 | 1048 |
1049 } } // namespace v8::internal | 1049 } } // namespace v8::internal |
OLD | NEW |