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

Side by Side Diff: src/hydrogen.cc

Issue 5991001: Mark map-transition stores as map-changing instructions.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: x Created 10 years 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/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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 // from the end of the fixed part of the object. 3158 // from the end of the fixed part of the object.
3159 offset += type->instance_size(); 3159 offset += type->instance_size();
3160 } else { 3160 } else {
3161 offset += FixedArray::kHeaderSize; 3161 offset += FixedArray::kHeaderSize;
3162 } 3162 }
3163 HStoreNamedField* instr = 3163 HStoreNamedField* instr =
3164 new HStoreNamedField(object, name, value, is_in_object, offset); 3164 new HStoreNamedField(object, name, value, is_in_object, offset);
3165 if (lookup->type() == MAP_TRANSITION) { 3165 if (lookup->type() == MAP_TRANSITION) {
3166 Handle<Map> transition(lookup->GetTransitionMapFromMap(*type)); 3166 Handle<Map> transition(lookup->GetTransitionMapFromMap(*type));
3167 instr->set_transition(transition); 3167 instr->set_transition(transition);
3168 // TODO(fschneider): Record the new map type of the object in the IR to
3169 // enable elimination of redundant checks after the transition store.
3170 instr->SetFlag(HValue::kChangesMaps);
3168 } 3171 }
3169 return instr; 3172 return instr;
3170 } 3173 }
3171 3174
3172 3175
3173 HInstruction* HGraphBuilder::BuildStoreNamedGeneric(HValue* object, 3176 HInstruction* HGraphBuilder::BuildStoreNamedGeneric(HValue* object,
3174 Handle<String> name, 3177 Handle<String> name,
3175 HValue* value) { 3178 HValue* value) {
3176 return new HStoreNamedGeneric(object, name, value); 3179 return new HStoreNamedGeneric(object, name, value);
3177 } 3180 }
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after
5671 } 5674 }
5672 5675
5673 #ifdef DEBUG 5676 #ifdef DEBUG
5674 if (graph_ != NULL) graph_->Verify(); 5677 if (graph_ != NULL) graph_->Verify();
5675 if (chunk_ != NULL) chunk_->Verify(); 5678 if (chunk_ != NULL) chunk_->Verify();
5676 if (allocator_ != NULL) allocator_->Verify(); 5679 if (allocator_ != NULL) allocator_->Verify();
5677 #endif 5680 #endif
5678 } 5681 }
5679 5682
5680 } } // namespace v8::internal 5683 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698