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

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

Issue 189373006: A64: Improve constraints for StoreNamedField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Ulan's comments Created 6 years, 9 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/a64/lithium-codegen-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 ASSERT(instr->object()->representation().IsTagged()); 2172 ASSERT(instr->object()->representation().IsTagged());
2173 ASSERT(instr->key()->representation().IsTagged()); 2173 ASSERT(instr->key()->representation().IsTagged());
2174 ASSERT(instr->value()->representation().IsTagged()); 2174 ASSERT(instr->value()->representation().IsTagged());
2175 2175
2176 return MarkAsCall( 2176 return MarkAsCall(
2177 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); 2177 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr);
2178 } 2178 }
2179 2179
2180 2180
2181 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 2181 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
2182 // TODO(jbramley): Optimize register usage in this instruction. For now, it
2183 // allocates everything that it might need because it keeps changing in the
2184 // merge and keeping it valid is time-consuming.
2185
2186 // TODO(jbramley): It might be beneficial to allow value to be a constant in 2182 // TODO(jbramley): It might be beneficial to allow value to be a constant in
2187 // some cases. x64 makes use of this with FLAG_track_fields, for example. 2183 // some cases. x64 makes use of this with FLAG_track_fields, for example.
2188 2184
2189 LOperand* object = UseRegister(instr->object()); 2185 LOperand* object = UseRegister(instr->object());
2190 LOperand* value = UseRegisterAndClobber(instr->value()); 2186 LOperand* value;
2191 LOperand* temp0 = TempRegister(); 2187 LOperand* temp0 = NULL;
2192 LOperand* temp1 = TempRegister(); 2188 LOperand* temp1 = NULL;
2189
2190 if (instr->access().IsExternalMemory() ||
2191 instr->field_representation().IsDouble()) {
2192 value = UseRegister(instr->value());
2193 } else if (instr->NeedsWriteBarrier()) {
2194 value = UseRegisterAndClobber(instr->value());
2195 temp0 = TempRegister();
2196 temp1 = TempRegister();
2197 } else if (instr->NeedsWriteBarrierForMap()) {
2198 value = UseRegister(instr->value());
2199 temp0 = TempRegister();
2200 temp1 = TempRegister();
2201 } else {
2202 value = UseRegister(instr->value());
2203 temp0 = TempRegister();
2204 }
2193 2205
2194 LStoreNamedField* result = 2206 LStoreNamedField* result =
2195 new(zone()) LStoreNamedField(object, value, temp0, temp1); 2207 new(zone()) LStoreNamedField(object, value, temp0, temp1);
2196 if (instr->field_representation().IsHeapObject() && 2208 if (instr->field_representation().IsHeapObject() &&
2197 !instr->value()->type().IsHeapObject()) { 2209 !instr->value()->type().IsHeapObject()) {
2198 return AssignEnvironment(result); 2210 return AssignEnvironment(result);
2199 } 2211 }
2200 return result; 2212 return result;
2201 } 2213 }
2202 2214
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 2512
2501 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2513 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2502 LOperand* receiver = UseRegister(instr->receiver()); 2514 LOperand* receiver = UseRegister(instr->receiver());
2503 LOperand* function = UseRegister(instr->function()); 2515 LOperand* function = UseRegister(instr->function());
2504 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); 2516 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function);
2505 return AssignEnvironment(DefineAsRegister(result)); 2517 return AssignEnvironment(DefineAsRegister(result));
2506 } 2518 }
2507 2519
2508 2520
2509 } } // namespace v8::internal 2521 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698