Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 6853010: Refine allocation policy for input operands at calls. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index, 64 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index,
65 LOperand* spill_operand) { 65 LOperand* spill_operand) {
66 ASSERT(spill_operand->IsDoubleStackSlot()); 66 ASSERT(spill_operand->IsDoubleStackSlot());
67 ASSERT(double_register_spills_[allocation_index] == NULL); 67 ASSERT(double_register_spills_[allocation_index] == NULL);
68 double_register_spills_[allocation_index] = spill_operand; 68 double_register_spills_[allocation_index] = spill_operand;
69 } 69 }
70 70
71 71
72 #ifdef DEBUG 72 #ifdef DEBUG
73 void LInstruction::VerifyCall() { 73 void LInstruction::VerifyCall() {
74 // Call instructions can use only fixed registers as 74 // Call instructions can use only fixed registers as temporaries and
75 // temporaries and outputs because all registers 75 // outputs because all registers are blocked by the calling convention.
76 // are blocked by the calling convention. 76 // Inputs operands must use a fixed register or use-at-start policy or
77 // Inputs must use a fixed register. 77 // a non-register policy.
78 ASSERT(Output() == NULL || 78 ASSERT(Output() == NULL ||
79 LUnallocated::cast(Output())->HasFixedPolicy() || 79 LUnallocated::cast(Output())->HasFixedPolicy() ||
80 !LUnallocated::cast(Output())->HasRegisterPolicy()); 80 !LUnallocated::cast(Output())->HasRegisterPolicy());
81 for (UseIterator it(this); it.HasNext(); it.Advance()) { 81 for (UseIterator it(this); it.HasNext(); it.Advance()) {
82 LOperand* operand = it.Next(); 82 LUnallocated* operand = LUnallocated::cast(it.Next());
83 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || 83 ASSERT(operand->HasFixedPolicy() ||
84 !LUnallocated::cast(operand)->HasRegisterPolicy()); 84 operand->IsUsedAtStart());
85 } 85 }
86 for (TempIterator it(this); it.HasNext(); it.Advance()) { 86 for (TempIterator it(this); it.HasNext(); it.Advance()) {
87 LOperand* operand = it.Next(); 87 LUnallocated* operand = LUnallocated::cast(it.Next());
88 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || 88 ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy());
89 !LUnallocated::cast(operand)->HasRegisterPolicy());
90 } 89 }
91 } 90 }
92 #endif 91 #endif
93 92
94 93
95 void LInstruction::PrintTo(StringStream* stream) { 94 void LInstruction::PrintTo(StringStream* stream) {
96 stream->Add("%s ", this->Mnemonic()); 95 stream->Add("%s ", this->Mnemonic());
97 96
98 PrintOutputOperandTo(stream); 97 PrintOutputOperandTo(stream);
99 98
(...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 } 2038 }
2040 2039
2041 2040
2042 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { 2041 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
2043 return MarkAsCall(DefineFixed(new LFunctionLiteral, eax), instr); 2042 return MarkAsCall(DefineFixed(new LFunctionLiteral, eax), instr);
2044 } 2043 }
2045 2044
2046 2045
2047 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { 2046 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
2048 LDeleteProperty* result = 2047 LDeleteProperty* result =
2049 new LDeleteProperty(Use(instr->object()), UseOrConstant(instr->key())); 2048 new LDeleteProperty(UseAtStart(instr->object()),
2049 UseOrConstantAtStart(instr->key()));
2050 return MarkAsCall(DefineFixed(result, eax), instr); 2050 return MarkAsCall(DefineFixed(result, eax), instr);
2051 } 2051 }
2052 2052
2053 2053
2054 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2054 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2055 allocator_->MarkAsOsrEntry(); 2055 allocator_->MarkAsOsrEntry();
2056 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2056 current_block_->last_environment()->set_ast_id(instr->ast_id());
2057 return AssignEnvironment(new LOsrEntry); 2057 return AssignEnvironment(new LOsrEntry);
2058 } 2058 }
2059 2059
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2172 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2173 HEnvironment* outer = current_block_->last_environment()->outer(); 2173 HEnvironment* outer = current_block_->last_environment()->outer();
2174 current_block_->UpdateEnvironment(outer); 2174 current_block_->UpdateEnvironment(outer);
2175 return NULL; 2175 return NULL;
2176 } 2176 }
2177 2177
2178 2178
2179 } } // namespace v8::internal 2179 } } // namespace v8::internal
2180 2180
2181 #endif // V8_TARGET_ARCH_IA32 2181 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698