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

Side by Side Diff: src/hydrogen.cc

Issue 49553005: Bailout from CanLoadMonomorphic if a prototype with a deprecated map cannot be migrated. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | no next file » | 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 4747 matching lines...) Expand 10 before | Expand all | Expand 10 after
4758 4758
4759 return true; 4759 return true;
4760 } 4760 }
4761 4761
4762 4762
4763 bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes() { 4763 bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupInPrototypes() {
4764 Handle<Map> map = map_; 4764 Handle<Map> map = map_;
4765 while (map->prototype()->IsJSObject()) { 4765 while (map->prototype()->IsJSObject()) {
4766 holder_ = handle(JSObject::cast(map->prototype())); 4766 holder_ = handle(JSObject::cast(map->prototype()));
4767 if (holder_->map()->is_deprecated()) { 4767 if (holder_->map()->is_deprecated()) {
4768 JSObject::TryMigrateInstance(holder_); 4768 Handle<Object> result = JSObject::TryMigrateInstance(holder_);
4769 if (result.is_null()) return false;
4769 } 4770 }
4770 map = Handle<Map>(holder_->map()); 4771 map = Handle<Map>(holder_->map());
4771 if (!CanInlinePropertyAccess(*map)) { 4772 if (!CanInlinePropertyAccess(*map)) return false;
4772 lookup_.NotFound();
4773 return false;
4774 }
4775 map->LookupDescriptor(*holder_, *name_, &lookup_); 4773 map->LookupDescriptor(*holder_, *name_, &lookup_);
4776 if (lookup_.IsFound()) return LoadResult(map); 4774 if (lookup_.IsFound()) return LoadResult(map);
4777 } 4775 }
4778 lookup_.NotFound(); 4776 lookup_.NotFound();
4779 return true; 4777 return true;
4780 } 4778 }
4781 4779
4782 4780
4783 bool HOptimizedGraphBuilder::PropertyAccessInfo::CanLoadMonomorphic() { 4781 bool HOptimizedGraphBuilder::PropertyAccessInfo::CanLoadMonomorphic() {
4784 if (!CanInlinePropertyAccess(*map_)) return IsStringLength(); 4782 if (!CanInlinePropertyAccess(*map_)) return IsStringLength();
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after
9824 if (ShouldProduceTraceOutput()) { 9822 if (ShouldProduceTraceOutput()) {
9825 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9823 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9826 } 9824 }
9827 9825
9828 #ifdef DEBUG 9826 #ifdef DEBUG
9829 graph_->Verify(false); // No full verify. 9827 graph_->Verify(false); // No full verify.
9830 #endif 9828 #endif
9831 } 9829 }
9832 9830
9833 } } // namespace v8::internal 9831 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698