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

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

Issue 14850006: Use mutable heapnumbers to store doubles in fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to ARM and x64 Created 7 years, 7 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/ic-arm.cc ('k') | src/arm/lithium-codegen-arm.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 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 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 if (needs_write_barrier) { 2311 if (needs_write_barrier) {
2312 obj = instr->is_in_object() 2312 obj = instr->is_in_object()
2313 ? UseRegister(instr->object()) 2313 ? UseRegister(instr->object())
2314 : UseTempRegister(instr->object()); 2314 : UseTempRegister(instr->object());
2315 } else { 2315 } else {
2316 obj = needs_write_barrier_for_map 2316 obj = needs_write_barrier_for_map
2317 ? UseRegister(instr->object()) 2317 ? UseRegister(instr->object())
2318 : UseRegisterAtStart(instr->object()); 2318 : UseRegisterAtStart(instr->object());
2319 } 2319 }
2320 2320
2321 LOperand* val = 2321 LOperand* val;
2322 needs_write_barrier || 2322 if (needs_write_barrier ||
2323 (FLAG_track_fields && instr->field_representation().IsSmi()) 2323 (FLAG_track_fields && instr->field_representation().IsSmi())) {
2324 ? UseTempRegister(instr->value()) : UseRegister(instr->value()); 2324 val = UseTempRegister(instr->value());
2325 } else if (FLAG_track_double_fields &&
2326 instr->field_representation().IsDouble()) {
2327 val = UseRegisterAtStart(instr->value());
2328 } else {
2329 val = UseRegister(instr->value());
2330 }
2325 2331
2326 // We need a temporary register for write barrier of the map field. 2332 // We need a temporary register for write barrier of the map field.
2327 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; 2333 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
2328 2334
2329 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); 2335 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp);
2330 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || 2336 if (FLAG_track_fields && instr->field_representation().IsSmi()) {
2331 (FLAG_track_double_fields && instr->field_representation().IsDouble())) {
2332 return AssignEnvironment(result); 2337 return AssignEnvironment(result);
2333 } 2338 }
2334 return result; 2339 return result;
2335 } 2340 }
2336 2341
2337 2342
2338 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2343 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2339 LOperand* obj = UseFixed(instr->object(), r1); 2344 LOperand* obj = UseFixed(instr->object(), r1);
2340 LOperand* val = UseFixed(instr->value(), r0); 2345 LOperand* val = UseFixed(instr->value(), r0);
2341 2346
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 2626
2622 2627
2623 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2628 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2624 LOperand* object = UseRegister(instr->object()); 2629 LOperand* object = UseRegister(instr->object());
2625 LOperand* index = UseRegister(instr->index()); 2630 LOperand* index = UseRegister(instr->index());
2626 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2631 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2627 } 2632 }
2628 2633
2629 2634
2630 } } // namespace v8::internal 2635 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698