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

Side by Side Diff: src/arm/lithium-arm.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/arm/lithium-arm.h ('k') | src/ia32/lithium-ia32.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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 569 }
570 570
571 571
572 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { 572 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
573 return value->IsConstant() 573 return value->IsConstant()
574 ? chunk_->DefineConstantOperand(HConstant::cast(value)) 574 ? chunk_->DefineConstantOperand(HConstant::cast(value))
575 : UseRegisterAtStart(value); 575 : UseRegisterAtStart(value);
576 } 576 }
577 577
578 578
579 LOperand* LChunkBuilder::UseAny(HValue* value) {
580 return value->IsConstant()
581 ? chunk_->DefineConstantOperand(HConstant::cast(value))
582 : Use(value, new LUnallocated(LUnallocated::ANY));
583 }
584
585
579 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) { 586 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
580 if (value->EmitAtUses()) { 587 if (value->EmitAtUses()) {
581 HInstruction* instr = HInstruction::cast(value); 588 HInstruction* instr = HInstruction::cast(value);
582 VisitInstruction(instr); 589 VisitInstruction(instr);
583 } 590 }
584 allocator_->RecordUse(value, operand); 591 allocator_->RecordUse(value, operand);
585 return operand; 592 return operand;
586 } 593 }
587 594
588 595
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 outer); 907 outer);
901 int argument_index = 0; 908 int argument_index = 0;
902 for (int i = 0; i < value_count; ++i) { 909 for (int i = 0; i < value_count; ++i) {
903 HValue* value = hydrogen_env->values()->at(i); 910 HValue* value = hydrogen_env->values()->at(i);
904 LOperand* op = NULL; 911 LOperand* op = NULL;
905 if (value->IsArgumentsObject()) { 912 if (value->IsArgumentsObject()) {
906 op = NULL; 913 op = NULL;
907 } else if (value->IsPushArgument()) { 914 } else if (value->IsPushArgument()) {
908 op = new LArgument(argument_index++); 915 op = new LArgument(argument_index++);
909 } else { 916 } else {
910 op = UseOrConstant(value); 917 op = UseAny(value);
911 if (op->IsUnallocated()) {
912 LUnallocated* unalloc = LUnallocated::cast(op);
913 unalloc->set_policy(LUnallocated::ANY);
914 }
915 } 918 }
916 result->AddValue(op, value->representation()); 919 result->AddValue(op, value->representation());
917 } 920 }
918 921
919 return result; 922 return result;
920 } 923 }
921 924
922 925
923 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 926 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
924 LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(), 927 LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(),
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 1848
1846 1849
1847 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1850 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1848 HEnvironment* outer = current_block_->last_environment()->outer(); 1851 HEnvironment* outer = current_block_->last_environment()->outer();
1849 current_block_->UpdateEnvironment(outer); 1852 current_block_->UpdateEnvironment(outer);
1850 return NULL; 1853 return NULL;
1851 } 1854 }
1852 1855
1853 1856
1854 } } // namespace v8::internal 1857 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698