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

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

Issue 6471021: Strengthen requirements for fixed registers at calls.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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 | « no previous file | src/ia32/lithium-ia32.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ASSERT(register_spills_[allocation_index] == NULL); 55 ASSERT(register_spills_[allocation_index] == NULL);
56 register_spills_[allocation_index] = spill_operand; 56 register_spills_[allocation_index] = spill_operand;
57 } 57 }
58 58
59 59
60 #ifdef DEBUG 60 #ifdef DEBUG
61 void LInstruction::VerifyCall() { 61 void LInstruction::VerifyCall() {
62 // Call instructions can use only fixed registers as 62 // Call instructions can use only fixed registers as
63 // temporaries and outputs because all registers 63 // temporaries and outputs because all registers
64 // are blocked by the calling convention. 64 // are blocked by the calling convention.
65 // Inputs can use either fixed register or have a short lifetime (be 65 // Inputs must use a fixed register.
66 // used at start of the instruction).
67 ASSERT(Output() == NULL || 66 ASSERT(Output() == NULL ||
68 LUnallocated::cast(Output())->HasFixedPolicy() || 67 LUnallocated::cast(Output())->HasFixedPolicy() ||
69 !LUnallocated::cast(Output())->HasRegisterPolicy()); 68 !LUnallocated::cast(Output())->HasRegisterPolicy());
70 for (UseIterator it(this); it.HasNext(); it.Advance()) { 69 for (UseIterator it(this); it.HasNext(); it.Advance()) {
71 LOperand* operand = it.Next(); 70 LOperand* operand = it.Next();
72 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || 71 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
73 !LUnallocated::cast(operand)->HasRegisterPolicy()); 72 !LUnallocated::cast(operand)->HasRegisterPolicy());
74 } 73 }
75 for (TempIterator it(this); it.HasNext(); it.Advance()) { 74 for (TempIterator it(this); it.HasNext(); it.Advance()) {
76 LOperand* operand = it.Next(); 75 LOperand* operand = it.Next();
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr); 1823 return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr);
1825 } 1824 }
1826 1825
1827 1826
1828 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { 1827 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
1829 return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr); 1828 return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr);
1830 } 1829 }
1831 1830
1832 1831
1833 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { 1832 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
1834 LOperand* object = UseRegisterAtStart(instr->object()); 1833 LOperand* object = UseFixed(instr->object(), r0);
1835 LOperand* key = UseRegisterAtStart(instr->key()); 1834 LOperand* key = UseFixed(instr->key(), r1);
1836 LDeleteProperty* result = new LDeleteProperty(object, key); 1835 LDeleteProperty* result = new LDeleteProperty(object, key);
1837 return MarkAsCall(DefineFixed(result, r0), instr); 1836 return MarkAsCall(DefineFixed(result, r0), instr);
1838 } 1837 }
1839 1838
1840 1839
1841 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 1840 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
1842 allocator_->MarkAsOsrEntry(); 1841 allocator_->MarkAsOsrEntry();
1843 current_block_->last_environment()->set_ast_id(instr->ast_id()); 1842 current_block_->last_environment()->set_ast_id(instr->ast_id());
1844 return AssignEnvironment(new LOsrEntry); 1843 return AssignEnvironment(new LOsrEntry);
1845 } 1844 }
(...skipping 27 matching lines...) Expand all
1873 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 1872 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
1874 LOperand* arguments = UseRegister(instr->arguments()); 1873 LOperand* arguments = UseRegister(instr->arguments());
1875 LOperand* length = UseTempRegister(instr->length()); 1874 LOperand* length = UseTempRegister(instr->length());
1876 LOperand* index = UseRegister(instr->index()); 1875 LOperand* index = UseRegister(instr->index());
1877 LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index); 1876 LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index);
1878 return AssignEnvironment(DefineAsRegister(result)); 1877 return AssignEnvironment(DefineAsRegister(result));
1879 } 1878 }
1880 1879
1881 1880
1882 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { 1881 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
1883 LTypeof* result = new LTypeof(UseRegisterAtStart(instr->value())); 1882 LTypeof* result = new LTypeof(UseFixed(instr->value(), r0));
1884 return MarkAsCall(DefineFixed(result, r0), instr); 1883 return MarkAsCall(DefineFixed(result, r0), instr);
1885 } 1884 }
1886 1885
1887 1886
1888 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { 1887 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
1889 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); 1888 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
1890 } 1889 }
1891 1890
1892 1891
1893 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) { 1892 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 1946
1948 1947
1949 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1948 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1950 HEnvironment* outer = current_block_->last_environment()->outer(); 1949 HEnvironment* outer = current_block_->last_environment()->outer();
1951 current_block_->UpdateEnvironment(outer); 1950 current_block_->UpdateEnvironment(outer);
1952 return NULL; 1951 return NULL;
1953 } 1952 }
1954 1953
1955 1954
1956 } } // namespace v8::internal 1955 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698