| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // The pc (return address) is already on TOS. | 453 // The pc (return address) is already on TOS. |
| 454 if (try_location == IN_JAVASCRIPT) { | 454 if (try_location == IN_JAVASCRIPT) { |
| 455 if (type == TRY_CATCH_HANDLER) { | 455 if (type == TRY_CATCH_HANDLER) { |
| 456 push(Immediate(StackHandler::TRY_CATCH)); | 456 push(Immediate(StackHandler::TRY_CATCH)); |
| 457 } else { | 457 } else { |
| 458 push(Immediate(StackHandler::TRY_FINALLY)); | 458 push(Immediate(StackHandler::TRY_FINALLY)); |
| 459 } | 459 } |
| 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 frame pointer does not point to a JS frame so we save NULL |
| 464 // point to a JS frame. So we save NULL for both pp and ebp. We | 464 // for ebp. We expect the code throwing an exception to check ebp |
| 465 // expect the code throwing an exception to check ebp before | 465 // before dereferencing it to restore the context. |
| 466 // dereferencing it to restore the context. | |
| 467 push(Immediate(StackHandler::ENTRY)); | 466 push(Immediate(StackHandler::ENTRY)); |
| 468 push(Immediate(0)); // NULL frame pointer | 467 push(Immediate(0)); // NULL frame pointer. |
| 469 } | 468 } |
| 470 // Save the current handler as the next handler. | 469 // Save the current handler as the next handler. |
| 471 push(Operand::StaticVariable(ExternalReference(Top::k_handler_address))); | 470 push(Operand::StaticVariable(ExternalReference(Top::k_handler_address))); |
| 472 // Link this handler as the new current one. | 471 // Link this handler as the new current one. |
| 473 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp); | 472 mov(Operand::StaticVariable(ExternalReference(Top::k_handler_address)), esp); |
| 474 } | 473 } |
| 475 | 474 |
| 476 | 475 |
| 477 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, | 476 Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg, |
| 478 JSObject* holder, Register holder_reg, | 477 JSObject* holder, Register holder_reg, |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 // Indicate that code has changed. | 1039 // Indicate that code has changed. |
| 1041 CPU::FlushICache(address_, size_); | 1040 CPU::FlushICache(address_, size_); |
| 1042 | 1041 |
| 1043 // Check that the code was patched as expected. | 1042 // Check that the code was patched as expected. |
| 1044 ASSERT(masm_.pc_ == address_ + size_); | 1043 ASSERT(masm_.pc_ == address_ + size_); |
| 1045 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1044 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1046 } | 1045 } |
| 1047 | 1046 |
| 1048 | 1047 |
| 1049 } } // namespace v8::internal | 1048 } } // namespace v8::internal |
| OLD | NEW |