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

Side by Side Diff: src/ic.cc

Issue 2818023: Augment trace-ic to provide information on patching inlined loads. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Map* map = lookup.holder()->map(); 727 Map* map = lookup.holder()->map();
728 // Property's index in the properties array. If negative we have 728 // Property's index in the properties array. If negative we have
729 // an inobject property. 729 // an inobject property.
730 int index = lookup.GetFieldIndex() - map->inobject_properties(); 730 int index = lookup.GetFieldIndex() - map->inobject_properties();
731 if (index < 0) { 731 if (index < 0) {
732 // Index is an offset from the end of the object. 732 // Index is an offset from the end of the object.
733 int offset = map->instance_size() + (index * kPointerSize); 733 int offset = map->instance_size() + (index * kPointerSize);
734 if (PatchInlinedLoad(address(), map, offset)) { 734 if (PatchInlinedLoad(address(), map, offset)) {
735 set_target(megamorphic_stub()); 735 set_target(megamorphic_stub());
736 return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex()); 736 return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
737 #ifdef DEBUG
738 if (FLAG_trace_ic) {
739 PrintF("[LoadIC : inline patch %s]\n", *name->ToCString());
740 }
741 } else {
742 if (FLAG_trace_ic) {
743 PrintF("[LoadIC : no inline patch %s (patching failed)]\n",
744 *name->ToCString());
745 }
746 }
747 } else {
748 if (FLAG_trace_ic) {
749 PrintF("[LoadIC : no inline patch %s (not inobject)]\n",
750 *name->ToCString());
751 }
752 }
753 } else {
754 if (FLAG_use_ic && state == PREMONOMORPHIC) {
755 if (FLAG_trace_ic) {
756 PrintF("[LoadIC : no inline patch %s (not inlinable)]\n",
757 *name->ToCString());
758 #endif
737 } 759 }
738 } 760 }
739 } 761 }
740 762
741 // Update inline cache and stub cache. 763 // Update inline cache and stub cache.
742 if (FLAG_use_ic) { 764 if (FLAG_use_ic) {
743 UpdateCaches(&lookup, state, object, name); 765 UpdateCaches(&lookup, state, object, name);
744 } 766 }
745 767
746 PropertyAttributes attr; 768 PropertyAttributes attr;
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 #undef ADDR 1617 #undef ADDR
1596 }; 1618 };
1597 1619
1598 1620
1599 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1621 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1600 return IC_utilities[id]; 1622 return IC_utilities[id];
1601 } 1623 }
1602 1624
1603 1625
1604 } } // namespace v8::internal 1626 } } // 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