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

Side by Side Diff: src/x64/lithium-x64.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/ia32/lithium-ia32.cc ('k') | no next file » | 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 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 } 1976 }
1978 1977
1979 1978
1980 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { 1979 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
1981 return MarkAsCall(DefineFixed(new LFunctionLiteral, rax), instr); 1980 return MarkAsCall(DefineFixed(new LFunctionLiteral, rax), instr);
1982 } 1981 }
1983 1982
1984 1983
1985 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { 1984 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
1986 LDeleteProperty* result = 1985 LDeleteProperty* result =
1987 new LDeleteProperty(Use(instr->object()), UseOrConstant(instr->key())); 1986 new LDeleteProperty(UseAtStart(instr->object()),
1987 UseOrConstantAtStart(instr->key()));
1988 return MarkAsCall(DefineFixed(result, rax), instr); 1988 return MarkAsCall(DefineFixed(result, rax), instr);
1989 } 1989 }
1990 1990
1991 1991
1992 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 1992 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
1993 allocator_->MarkAsOsrEntry(); 1993 allocator_->MarkAsOsrEntry();
1994 current_block_->last_environment()->set_ast_id(instr->ast_id()); 1994 current_block_->last_environment()->set_ast_id(instr->ast_id());
1995 return AssignEnvironment(new LOsrEntry); 1995 return AssignEnvironment(new LOsrEntry);
1996 } 1996 }
1997 1997
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 2106
2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2108 HEnvironment* outer = current_block_->last_environment()->outer(); 2108 HEnvironment* outer = current_block_->last_environment()->outer();
2109 current_block_->UpdateEnvironment(outer); 2109 current_block_->UpdateEnvironment(outer);
2110 return NULL; 2110 return NULL;
2111 } 2111 }
2112 2112
2113 } } // namespace v8::internal 2113 } } // namespace v8::internal
2114 2114
2115 #endif // V8_TARGET_ARCH_X64 2115 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698