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/hydrogen.cc

Issue 16875008: Fix using monomorphic store instruction for polymorphic stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | test/mjsunit/regress/regress-polymorphic-store.js » ('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 6390 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 } 6401 }
6402 } 6402 }
6403 6403
6404 if (count != types->length()) return false; 6404 if (count != types->length()) return false;
6405 6405
6406 // Everything matched; can use monomorphic store. 6406 // Everything matched; can use monomorphic store.
6407 BuildCheckNonSmi(object); 6407 BuildCheckNonSmi(object);
6408 AddInstruction(HCheckMaps::New(object, types, zone())); 6408 AddInstruction(HCheckMaps::New(object, types, zone()));
6409 HInstruction* store; 6409 HInstruction* store;
6410 CHECK_ALIVE_OR_RETURN( 6410 CHECK_ALIVE_OR_RETURN(
6411 store = BuildStoreNamedField(object, name, value, types->at(0), &lookup), 6411 store = BuildStoreNamedField(
6412 object, name, value, types->at(count - 1), &lookup),
6412 true); 6413 true);
6413 Push(value); 6414 Push(value);
6414 store->set_position(expr->position()); 6415 store->set_position(expr->position());
6415 AddInstruction(store); 6416 AddInstruction(store);
6416 AddSimulate(expr->AssignmentId()); 6417 AddSimulate(expr->AssignmentId());
6417 ast_context()->ReturnValue(Pop()); 6418 ast_context()->ReturnValue(Pop());
6418 return true; 6419 return true;
6419 } 6420 }
6420 6421
6421 6422
(...skipping 5230 matching lines...) Expand 10 before | Expand all | Expand 10 after
11652 } 11653 }
11653 } 11654 }
11654 11655
11655 #ifdef DEBUG 11656 #ifdef DEBUG
11656 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11657 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11657 if (allocator_ != NULL) allocator_->Verify(); 11658 if (allocator_ != NULL) allocator_->Verify();
11658 #endif 11659 #endif
11659 } 11660 }
11660 11661
11661 } } // namespace v8::internal 11662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-polymorphic-store.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698