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

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

Issue 23530066: Lazily save double registers for HCallRuntime instructions within Hydrogen code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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') | src/x64/macro-assembler-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 } 855 }
856 856
857 857
858 void LChunkBuilder::VisitInstruction(HInstruction* current) { 858 void LChunkBuilder::VisitInstruction(HInstruction* current) {
859 HInstruction* old_current = current_instruction_; 859 HInstruction* old_current = current_instruction_;
860 current_instruction_ = current; 860 current_instruction_ = current;
861 if (current->has_position()) position_ = current->position(); 861 if (current->has_position()) position_ = current->position();
862 LInstruction* instr = current->CompileToLithium(this); 862 LInstruction* instr = current->CompileToLithium(this);
863 863
864 if (instr != NULL) { 864 if (instr != NULL) {
865 // Associate the hydrogen instruction first, since we may need it for
866 // the ClobbersRegisters() or ClobbersDoubleRegisters() calls below.
867 instr->set_hydrogen_value(current);
868
865 #if DEBUG 869 #if DEBUG
866 // Make sure that the lithium instruction has either no fixed register 870 // Make sure that the lithium instruction has either no fixed register
867 // constraints in temps or the result OR no uses that are only used at 871 // constraints in temps or the result OR no uses that are only used at
868 // start. If this invariant doesn't hold, the register allocator can decide 872 // start. If this invariant doesn't hold, the register allocator can decide
869 // to insert a split of a range immediately before the instruction due to an 873 // to insert a split of a range immediately before the instruction due to an
870 // already allocated register needing to be used for the instruction's fixed 874 // already allocated register needing to be used for the instruction's fixed
871 // register constraint. In this case, The register allocator won't see an 875 // register constraint. In this case, The register allocator won't see an
872 // interference between the split child and the use-at-start (it would if 876 // interference between the split child and the use-at-start (it would if
873 // the it was just a plain use), so it is free to move the split child into 877 // the it was just a plain use), so it is free to move the split child into
874 // the same register that is used for the use-at-start. 878 // the same register that is used for the use-at-start.
(...skipping 16 matching lines...) Expand all
891 } 895 }
892 #endif 896 #endif
893 897
894 instr->set_position(position_); 898 instr->set_position(position_);
895 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 899 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
896 instr = AssignPointerMap(instr); 900 instr = AssignPointerMap(instr);
897 } 901 }
898 if (FLAG_stress_environments && !instr->HasEnvironment()) { 902 if (FLAG_stress_environments && !instr->HasEnvironment()) {
899 instr = AssignEnvironment(instr); 903 instr = AssignEnvironment(instr);
900 } 904 }
901 instr->set_hydrogen_value(current);
902 chunk_->AddInstruction(instr, current_block_); 905 chunk_->AddInstruction(instr, current_block_);
903 } 906 }
904 current_instruction_ = old_current; 907 current_instruction_ = old_current;
905 } 908 }
906 909
907 910
908 LEnvironment* LChunkBuilder::CreateEnvironment( 911 LEnvironment* LChunkBuilder::CreateEnvironment(
909 HEnvironment* hydrogen_env, 912 HEnvironment* hydrogen_env,
910 int* argument_index_accumulator, 913 int* argument_index_accumulator,
911 ZoneList<HValue*>* objects_to_materialize) { 914 ZoneList<HValue*>* objects_to_materialize) {
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2527 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2525 LOperand* object = UseRegister(instr->object()); 2528 LOperand* object = UseRegister(instr->object());
2526 LOperand* index = UseTempRegister(instr->index()); 2529 LOperand* index = UseTempRegister(instr->index());
2527 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2530 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2528 } 2531 }
2529 2532
2530 2533
2531 } } // namespace v8::internal 2534 } } // namespace v8::internal
2532 2535
2533 #endif // V8_TARGET_ARCH_X64 2536 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698