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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 565
566 566
567 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { 567 LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
568 return value->IsConstant() 568 return value->IsConstant()
569 ? chunk_->DefineConstantOperand(HConstant::cast(value)) 569 ? chunk_->DefineConstantOperand(HConstant::cast(value))
570 : UseRegisterAtStart(value); 570 : UseRegisterAtStart(value);
571 } 571 }
572 572
573 573
574 LOperand* LChunkBuilder::UseAny(HValue* value) {
575 return value->IsConstant()
576 ? chunk_->DefineConstantOperand(HConstant::cast(value))
577 : Use(value, new LUnallocated(LUnallocated::ANY));
578 }
579
580
574 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) { 581 LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
575 if (value->EmitAtUses()) { 582 if (value->EmitAtUses()) {
576 HInstruction* instr = HInstruction::cast(value); 583 HInstruction* instr = HInstruction::cast(value);
577 VisitInstruction(instr); 584 VisitInstruction(instr);
578 } 585 }
579 allocator_->RecordUse(value, operand); 586 allocator_->RecordUse(value, operand);
580 return operand; 587 return operand;
581 } 588 }
582 589
583 590
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 outer); 863 outer);
857 int argument_index = 0; 864 int argument_index = 0;
858 for (int i = 0; i < value_count; ++i) { 865 for (int i = 0; i < value_count; ++i) {
859 HValue* value = hydrogen_env->values()->at(i); 866 HValue* value = hydrogen_env->values()->at(i);
860 LOperand* op = NULL; 867 LOperand* op = NULL;
861 if (value->IsArgumentsObject()) { 868 if (value->IsArgumentsObject()) {
862 op = NULL; 869 op = NULL;
863 } else if (value->IsPushArgument()) { 870 } else if (value->IsPushArgument()) {
864 op = new LArgument(argument_index++); 871 op = new LArgument(argument_index++);
865 } else { 872 } else {
866 op = UseOrConstant(value); 873 op = UseAny(value);
867 if (op->IsUnallocated()) {
868 LUnallocated* unalloc = LUnallocated::cast(op);
869 unalloc->set_policy(LUnallocated::ANY);
870 }
871 } 874 }
872 result->AddValue(op, value->representation()); 875 result->AddValue(op, value->representation());
873 } 876 }
874 877
875 return result; 878 return result;
876 } 879 }
877 880
878 881
879 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 882 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
880 LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(), 883 LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(),
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 1429
1427 1430
1428 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1431 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1429 Abort("Unimplemented: %s", "DoLeaveInlined"); 1432 Abort("Unimplemented: %s", "DoLeaveInlined");
1430 return NULL; 1433 return NULL;
1431 } 1434 }
1432 1435
1433 } } // namespace v8::internal 1436 } } // namespace v8::internal
1434 1437
1435 #endif // V8_TARGET_ARCH_X64 1438 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698