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

Side by Side Diff: src/hydrogen.cc

Issue 152923006: Fix for a smi stores optimization on x64 with a test case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/flag-definitions.h ('k') | src/hydrogen-instructions.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 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 9835 matching lines...) Expand 10 before | Expand all | Expand 10 after
9846 HInstruction* double_box = 9846 HInstruction* double_box =
9847 Add<HAllocate>(heap_number_constant, HType::HeapNumber(), 9847 Add<HAllocate>(heap_number_constant, HType::HeapNumber(),
9848 pretenure_flag, HEAP_NUMBER_TYPE); 9848 pretenure_flag, HEAP_NUMBER_TYPE);
9849 AddStoreMapConstant(double_box, 9849 AddStoreMapConstant(double_box,
9850 isolate()->factory()->heap_number_map()); 9850 isolate()->factory()->heap_number_map());
9851 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), 9851 Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(),
9852 Add<HConstant>(value)); 9852 Add<HConstant>(value));
9853 value_instruction = double_box; 9853 value_instruction = double_box;
9854 } else if (representation.IsSmi() && value->IsUninitialized()) { 9854 } else if (representation.IsSmi() && value->IsUninitialized()) {
9855 value_instruction = graph()->GetConstant0(); 9855 value_instruction = graph()->GetConstant0();
9856 // Ensure that Constant0 is stored as smi.
9857 access = access.WithRepresentation(representation);
9856 } else { 9858 } else {
9857 value_instruction = Add<HConstant>(value); 9859 value_instruction = Add<HConstant>(value);
9858 } 9860 }
9859 9861
9860 Add<HStoreNamedField>(object, access, value_instruction); 9862 Add<HStoreNamedField>(object, access, value_instruction);
9861 } 9863 }
9862 } 9864 }
9863 9865
9864 int inobject_properties = boilerplate_object->map()->inobject_properties(); 9866 int inobject_properties = boilerplate_object->map()->inobject_properties();
9865 HInstruction* value_instruction = 9867 HInstruction* value_instruction =
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
11195 if (ShouldProduceTraceOutput()) { 11197 if (ShouldProduceTraceOutput()) {
11196 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11198 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11197 } 11199 }
11198 11200
11199 #ifdef DEBUG 11201 #ifdef DEBUG
11200 graph_->Verify(false); // No full verify. 11202 graph_->Verify(false); // No full verify.
11201 #endif 11203 #endif
11202 } 11204 }
11203 11205
11204 } } // namespace v8::internal 11206 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698