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

Side by Side Diff: src/ic.cc

Issue 16347005: Lookup transition again after migrating a transition target. (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 | 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 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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 // instance would transition to, create a new transition that fits the value. 1534 // instance would transition to, create a new transition that fits the value.
1535 // This has to be done before generating the IC, since that IC will embed the 1535 // This has to be done before generating the IC, since that IC will embed the
1536 // transition target. 1536 // transition target.
1537 // Ensure the instance and its map were migrated before trying to update the 1537 // Ensure the instance and its map were migrated before trying to update the
1538 // transition target. 1538 // transition target.
1539 ASSERT(!receiver->map()->is_deprecated()); 1539 ASSERT(!receiver->map()->is_deprecated());
1540 if (!value->FitsRepresentation(target_details.representation())) { 1540 if (!value->FitsRepresentation(target_details.representation())) {
1541 Handle<Map> target(lookup->GetTransitionMapFromMap(receiver->map())); 1541 Handle<Map> target(lookup->GetTransitionMapFromMap(receiver->map()));
1542 Map::GeneralizeRepresentation( 1542 Map::GeneralizeRepresentation(
1543 target, target->LastAdded(), value->OptimalRepresentation()); 1543 target, target->LastAdded(), value->OptimalRepresentation());
1544 // Lookup the transition again since the transition tree may have changed
1545 // entirely by the migration above.
1546 receiver->map()->LookupTransition(*holder, *name, lookup);
1547 if (!lookup->IsTransition()) return false;
1544 *state = MONOMORPHIC_PROTOTYPE_FAILURE; 1548 *state = MONOMORPHIC_PROTOTYPE_FAILURE;
1545 } 1549 }
1546 return true; 1550 return true;
1547 } 1551 }
1548 1552
1549 1553
1550 MaybeObject* StoreIC::Store(State state, 1554 MaybeObject* StoreIC::Store(State state,
1551 StrictModeFlag strict_mode, 1555 StrictModeFlag strict_mode,
1552 Handle<Object> object, 1556 Handle<Object> object,
1553 Handle<String> name, 1557 Handle<String> name,
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 #undef ADDR 3033 #undef ADDR
3030 }; 3034 };
3031 3035
3032 3036
3033 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3037 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3034 return IC_utilities[id]; 3038 return IC_utilities[id];
3035 } 3039 }
3036 3040
3037 3041
3038 } } // namespace v8::internal 3042 } } // 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