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

Side by Side Diff: src/ic.cc

Issue 22911018: Remove special case code for generalizing constants to fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/bootstrapper.cc ('k') | src/objects.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 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 // If the value that's being stored does not fit in the field that the 1608 // If the value that's being stored does not fit in the field that the
1609 // instance would transition to, create a new transition that fits the value. 1609 // instance would transition to, create a new transition that fits the value.
1610 // This has to be done before generating the IC, since that IC will embed the 1610 // This has to be done before generating the IC, since that IC will embed the
1611 // transition target. 1611 // transition target.
1612 // Ensure the instance and its map were migrated before trying to update the 1612 // Ensure the instance and its map were migrated before trying to update the
1613 // transition target. 1613 // transition target.
1614 ASSERT(!receiver->map()->is_deprecated()); 1614 ASSERT(!receiver->map()->is_deprecated());
1615 if (!value->FitsRepresentation(target_details.representation())) { 1615 if (!value->FitsRepresentation(target_details.representation())) {
1616 Handle<Map> target(lookup->GetTransitionMapFromMap(receiver->map())); 1616 Handle<Map> target(lookup->GetTransitionMapFromMap(receiver->map()));
1617 Map::GeneralizeRepresentation( 1617 Map::GeneralizeRepresentation(
1618 target, target->LastAdded(), value->OptimalRepresentation()); 1618 target, target->LastAdded(),
1619 value->OptimalRepresentation(), FORCE_FIELD);
1619 // Lookup the transition again since the transition tree may have changed 1620 // Lookup the transition again since the transition tree may have changed
1620 // entirely by the migration above. 1621 // entirely by the migration above.
1621 receiver->map()->LookupTransition(*holder, *name, lookup); 1622 receiver->map()->LookupTransition(*holder, *name, lookup);
1622 if (!lookup->IsTransition()) return false; 1623 if (!lookup->IsTransition()) return false;
1623 *state = MONOMORPHIC_PROTOTYPE_FAILURE; 1624 *state = MONOMORPHIC_PROTOTYPE_FAILURE;
1624 } 1625 }
1625 return true; 1626 return true;
1626 } 1627 }
1627 1628
1628 1629
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
3106 #undef ADDR 3107 #undef ADDR
3107 }; 3108 };
3108 3109
3109 3110
3110 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3111 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3111 return IC_utilities[id]; 3112 return IC_utilities[id];
3112 } 3113 }
3113 3114
3114 3115
3115 } } // namespace v8::internal 3116 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698