| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 25 matching lines...) Expand all Loading... |
| 36 namespace v8 { | 36 namespace v8 { |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 #define DEFINE_COMPILE(type) \ | 39 #define DEFINE_COMPILE(type) \ |
| 40 void L##type::CompileToNative(LCodeGen* generator) { \ | 40 void L##type::CompileToNative(LCodeGen* generator) { \ |
| 41 generator->Do##type(this); \ | 41 generator->Do##type(this); \ |
| 42 } | 42 } |
| 43 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) | 43 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) |
| 44 #undef DEFINE_COMPILE | 44 #undef DEFINE_COMPILE |
| 45 | 45 |
| 46 LOsrEntry::LOsrEntry() { | |
| 47 for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) { | |
| 48 register_spills_[i] = NULL; | |
| 49 } | |
| 50 for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) { | |
| 51 double_register_spills_[i] = NULL; | |
| 52 } | |
| 53 } | |
| 54 | |
| 55 | |
| 56 void LOsrEntry::MarkSpilledRegister(int allocation_index, | |
| 57 LOperand* spill_operand) { | |
| 58 ASSERT(spill_operand->IsStackSlot()); | |
| 59 ASSERT(register_spills_[allocation_index] == NULL); | |
| 60 register_spills_[allocation_index] = spill_operand; | |
| 61 } | |
| 62 | |
| 63 | |
| 64 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index, | |
| 65 LOperand* spill_operand) { | |
| 66 ASSERT(spill_operand->IsDoubleStackSlot()); | |
| 67 ASSERT(double_register_spills_[allocation_index] == NULL); | |
| 68 double_register_spills_[allocation_index] = spill_operand; | |
| 69 } | |
| 70 | |
| 71 | 46 |
| 72 #ifdef DEBUG | 47 #ifdef DEBUG |
| 73 void LInstruction::VerifyCall() { | 48 void LInstruction::VerifyCall() { |
| 74 // Call instructions can use only fixed registers as temporaries and | 49 // Call instructions can use only fixed registers as temporaries and |
| 75 // outputs because all registers are blocked by the calling convention. | 50 // outputs because all registers are blocked by the calling convention. |
| 76 // Inputs operands must use a fixed register or use-at-start policy or | 51 // Inputs operands must use a fixed register or use-at-start policy or |
| 77 // a non-register policy. | 52 // a non-register policy. |
| 78 ASSERT(Output() == NULL || | 53 ASSERT(Output() == NULL || |
| 79 LUnallocated::cast(Output())->HasFixedPolicy() || | 54 LUnallocated::cast(Output())->HasFixedPolicy() || |
| 80 !LUnallocated::cast(Output())->HasRegisterPolicy()); | 55 !LUnallocated::cast(Output())->HasRegisterPolicy()); |
| (...skipping 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2575 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2601 LOperand* object = UseRegister(instr->object()); | 2576 LOperand* object = UseRegister(instr->object()); |
| 2602 LOperand* index = UseTempRegister(instr->index()); | 2577 LOperand* index = UseTempRegister(instr->index()); |
| 2603 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2578 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2604 } | 2579 } |
| 2605 | 2580 |
| 2606 | 2581 |
| 2607 } } // namespace v8::internal | 2582 } } // namespace v8::internal |
| 2608 | 2583 |
| 2609 #endif // V8_TARGET_ARCH_X64 | 2584 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |