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

Side by Side Diff: src/ic.cc

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/ia32/stub-cache-ia32.cc ('k') | src/isolate.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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // TODO(2029): When an optimized function is patched, it would 372 // TODO(2029): When an optimized function is patched, it would
373 // be nice to propagate the corresponding type information to its 373 // be nice to propagate the corresponding type information to its
374 // unoptimized version for the benefit of later inlining. 374 // unoptimized version for the benefit of later inlining.
375 } 375 }
376 376
377 377
378 void IC::Clear(Address address) { 378 void IC::Clear(Address address) {
379 Code* target = GetTargetAtAddress(address); 379 Code* target = GetTargetAtAddress(address);
380 380
381 // Don't clear debug break inline cache as it will remove the break point. 381 // Don't clear debug break inline cache as it will remove the break point.
382 if (target->is_debug_break()) return; 382 if (target->is_debug_stub()) return;
383 383
384 switch (target->kind()) { 384 switch (target->kind()) {
385 case Code::LOAD_IC: return LoadIC::Clear(address, target); 385 case Code::LOAD_IC: return LoadIC::Clear(address, target);
386 case Code::KEYED_LOAD_IC: return KeyedLoadIC::Clear(address, target); 386 case Code::KEYED_LOAD_IC: return KeyedLoadIC::Clear(address, target);
387 case Code::STORE_IC: return StoreIC::Clear(address, target); 387 case Code::STORE_IC: return StoreIC::Clear(address, target);
388 case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target); 388 case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target);
389 case Code::CALL_IC: return CallIC::Clear(address, target); 389 case Code::CALL_IC: return CallIC::Clear(address, target);
390 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target); 390 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target);
391 case Code::COMPARE_IC: return CompareIC::Clear(address, target); 391 case Code::COMPARE_IC: return CompareIC::Clear(address, target);
392 case Code::COMPARE_NIL_IC: return CompareNilIC::Clear(address, target); 392 case Code::COMPARE_NIL_IC: return CompareNilIC::Clear(address, target);
(...skipping 1215 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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 #undef ADDR 3094 #undef ADDR
3094 }; 3095 };
3095 3096
3096 3097
3097 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3098 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3098 return IC_utilities[id]; 3099 return IC_utilities[id];
3099 } 3100 }
3100 3101
3101 3102
3102 } } // namespace v8::internal 3103 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698