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

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

Issue 6348003: Add UseAny to create a LOperand without register preference.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: fixed linto Created 9 years, 11 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.h ('k') | src/x64/lithium-x64.h » ('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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } 567 }
568 568
569 569
570 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { 570 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
571 return value->IsConstant() 571 return value->IsConstant()
572 ? chunk_->DefineConstantOperand(HConstant::cast(value)) 572 ? chunk_->DefineConstantOperand(HConstant::cast(value))
573 : UseRegisterAtStart(value); 573 : UseRegisterAtStart(value);
574 } 574 }
575 575
576 576
577 LOperand* LChunkBuilder::UseAny(HValue* value) {
578 return value->IsConstant()
579 ? chunk_->DefineConstantOperand(HConstant::cast(value))
580 : Use(value, new LUnallocated(LUnallocated::ANY));
581 }
582
583
577 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) { 584 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
578 if (value->EmitAtUses()) { 585 if (value->EmitAtUses()) {
579 HInstruction* instr = HInstruction::cast(value); 586 HInstruction* instr = HInstruction::cast(value);
580 VisitInstruction(instr); 587 VisitInstruction(instr);
581 } 588 }
582 allocator_->RecordUse(value, operand); 589 allocator_->RecordUse(value, operand);
583 return operand; 590 return operand;
584 } 591 }
585 592
586 593
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 outer); 934 outer);
928 int argument_index = 0; 935 int argument_index = 0;
929 for (int i = 0; i < value_count; ++i) { 936 for (int i = 0; i < value_count; ++i) {
930 HValue* value = hydrogen_env->values()->at(i); 937 HValue* value = hydrogen_env->values()->at(i);
931 LOperand* op = NULL; 938 LOperand* op = NULL;
932 if (value->IsArgumentsObject()) { 939 if (value->IsArgumentsObject()) {
933 op = NULL; 940 op = NULL;
934 } else if (value->IsPushArgument()) { 941 } else if (value->IsPushArgument()) {
935 op = new LArgument(argument_index++); 942 op = new LArgument(argument_index++);
936 } else { 943 } else {
937 op = UseOrConstant(value); 944 op = UseAny(value);
938 if (op->IsUnallocated()) {
939 LUnallocated* unalloc = LUnallocated::cast(op);
940 unalloc->set_policy(LUnallocated::ANY);
941 }
942 } 945 }
943 result->AddValue(op, value->representation()); 946 result->AddValue(op, value->representation());
944 } 947 }
945 948
946 return result; 949 return result;
947 } 950 }
948 951
949 952
950 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 953 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
951 LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(), 954 LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(),
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1872 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1870 HEnvironment* outer = current_block_->last_environment()->outer(); 1873 HEnvironment* outer = current_block_->last_environment()->outer();
1871 current_block_->UpdateEnvironment(outer); 1874 current_block_->UpdateEnvironment(outer);
1872 return NULL; 1875 return NULL;
1873 } 1876 }
1874 1877
1875 1878
1876 } } // namespace v8::internal 1879 } } // namespace v8::internal
1877 1880
1878 #endif // V8_TARGET_ARCH_IA32 1881 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698