OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void LOsrEntry::MarkSpilledRegister(int allocation_index, | 54 void LOsrEntry::MarkSpilledRegister(int allocation_index, |
55 LOperand* spill_operand) { | 55 LOperand* spill_operand) { |
56 ASSERT(spill_operand->IsStackSlot()); | 56 ASSERT(spill_operand->IsStackSlot()); |
57 ASSERT(register_spills_[allocation_index] == NULL); | 57 ASSERT(register_spills_[allocation_index] == NULL); |
58 register_spills_[allocation_index] = spill_operand; | 58 register_spills_[allocation_index] = spill_operand; |
59 } | 59 } |
60 | 60 |
61 | 61 |
62 #ifdef DEBUG | 62 #ifdef DEBUG |
63 void LInstruction::VerifyCall() { | 63 void LInstruction::VerifyCall() { |
64 // Call instructions can use only fixed registers as | 64 // Call instructions can use only fixed registers as temporaries and |
65 // temporaries and outputs because all registers | 65 // outputs because all registers are blocked by the calling convention. |
66 // are blocked by the calling convention. | 66 // Inputs operands must use a fixed register or use-at-start policy or |
67 // Inputs must use a fixed register. | 67 // a non-register policy. |
68 ASSERT(Output() == NULL || | 68 ASSERT(Output() == NULL || |
69 LUnallocated::cast(Output())->HasFixedPolicy() || | 69 LUnallocated::cast(Output())->HasFixedPolicy() || |
70 !LUnallocated::cast(Output())->HasRegisterPolicy()); | 70 !LUnallocated::cast(Output())->HasRegisterPolicy()); |
71 for (UseIterator it(this); it.HasNext(); it.Advance()) { | 71 for (UseIterator it(this); it.HasNext(); it.Advance()) { |
72 LOperand* operand = it.Next(); | 72 LUnallocated* operand = LUnallocated::cast(it.Next()); |
73 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || | 73 ASSERT(operand->HasFixedPolicy() || |
74 !LUnallocated::cast(operand)->HasRegisterPolicy()); | 74 operand->IsUsedAtStart()); |
75 } | 75 } |
76 for (TempIterator it(this); it.HasNext(); it.Advance()) { | 76 for (TempIterator it(this); it.HasNext(); it.Advance()) { |
77 LOperand* operand = it.Next(); | 77 LUnallocated* operand = LUnallocated::cast(it.Next()); |
78 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || | 78 ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy()); |
79 !LUnallocated::cast(operand)->HasRegisterPolicy()); | |
80 } | 79 } |
81 } | 80 } |
82 #endif | 81 #endif |
83 | 82 |
84 | 83 |
85 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index, | 84 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index, |
86 LOperand* spill_operand) { | 85 LOperand* spill_operand) { |
87 ASSERT(spill_operand->IsDoubleStackSlot()); | 86 ASSERT(spill_operand->IsDoubleStackSlot()); |
88 ASSERT(double_register_spills_[allocation_index] == NULL); | 87 ASSERT(double_register_spills_[allocation_index] == NULL); |
89 double_register_spills_[allocation_index] = spill_operand; | 88 double_register_spills_[allocation_index] = spill_operand; |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 | 2110 |
2112 | 2111 |
2113 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2112 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2114 HEnvironment* outer = current_block_->last_environment()->outer(); | 2113 HEnvironment* outer = current_block_->last_environment()->outer(); |
2115 current_block_->UpdateEnvironment(outer); | 2114 current_block_->UpdateEnvironment(outer); |
2116 return NULL; | 2115 return NULL; |
2117 } | 2116 } |
2118 | 2117 |
2119 | 2118 |
2120 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
OLD | NEW |