OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 Label ok; | 390 Label ok; |
391 test(object, Immediate(kSmiTagMask)); | 391 test(object, Immediate(kSmiTagMask)); |
392 j(zero, &ok); | 392 j(zero, &ok); |
393 cmp(FieldOperand(object, HeapObject::kMapOffset), | 393 cmp(FieldOperand(object, HeapObject::kMapOffset), |
394 Factory::heap_number_map()); | 394 Factory::heap_number_map()); |
395 Assert(equal, msg); | 395 Assert(equal, msg); |
396 bind(&ok); | 396 bind(&ok); |
397 } | 397 } |
398 | 398 |
399 | 399 |
400 void MacroAssembler::AbortIfNotSmi(Register object, const char* msg) { | |
401 test(object, Immediate(kSmiTagMask)); | |
402 Assert(equal, msg); | |
403 } | |
404 | |
405 | |
406 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 400 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
407 push(ebp); | 401 push(ebp); |
408 mov(ebp, Operand(esp)); | 402 mov(ebp, Operand(esp)); |
409 push(esi); | 403 push(esi); |
410 push(Immediate(Smi::FromInt(type))); | 404 push(Immediate(Smi::FromInt(type))); |
411 push(Immediate(CodeObject())); | 405 push(Immediate(CodeObject())); |
412 if (FLAG_debug_code) { | 406 if (FLAG_debug_code) { |
413 cmp(Operand(esp, 0), Immediate(Factory::undefined_value())); | 407 cmp(Operand(esp, 0), Immediate(Factory::undefined_value())); |
414 Check(not_equal, "code object not properly patched"); | 408 Check(not_equal, "code object not properly patched"); |
415 } | 409 } |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 // Indicate that code has changed. | 1673 // Indicate that code has changed. |
1680 CPU::FlushICache(address_, size_); | 1674 CPU::FlushICache(address_, size_); |
1681 | 1675 |
1682 // Check that the code was patched as expected. | 1676 // Check that the code was patched as expected. |
1683 ASSERT(masm_.pc_ == address_ + size_); | 1677 ASSERT(masm_.pc_ == address_ + size_); |
1684 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1678 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
1685 } | 1679 } |
1686 | 1680 |
1687 | 1681 |
1688 } } // namespace v8::internal | 1682 } } // namespace v8::internal |
OLD | NEW |