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

Side by Side Diff: src/type-info.cc

Issue 95503003: Remove special "store global proxy" IC, use as slow_stub(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/ic.cc ('k') | 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 515 }
516 516
517 517
518 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, 518 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
519 Handle<String> name, 519 Handle<String> name,
520 Code::Flags flags, 520 Code::Flags flags,
521 SmallMapList* types) { 521 SmallMapList* types) {
522 Handle<Object> object = GetInfo(ast_id); 522 Handle<Object> object = GetInfo(ast_id);
523 if (object->IsUndefined() || object->IsSmi()) return; 523 if (object->IsUndefined() || object->IsSmi()) return;
524 524
525 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { 525 if (object->IsMap()) {
526 // TODO(fschneider): We could collect the maps and signal that
527 // we need a generic store (or load) here.
528 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC);
529 } else if (object->IsMap()) {
530 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); 526 types->AddMapIfMissing(Handle<Map>::cast(object), zone());
531 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC || 527 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC ||
532 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) { 528 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) {
533 CollectPolymorphicMaps(Handle<Code>::cast(object), types); 529 CollectPolymorphicMaps(Handle<Code>::cast(object), types);
534 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && 530 } else if (FLAG_collect_megamorphic_maps_from_stub_cache &&
535 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { 531 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
536 types->Reserve(4, zone()); 532 types->Reserve(4, zone());
537 ASSERT(object->IsCode()); 533 ASSERT(object->IsCode());
538 isolate_->stub_cache()->CollectMatchingMaps(types, 534 isolate_->stub_cache()->CollectMatchingMaps(types,
539 name, 535 name,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 if (info.IsUninitialized()) return Representation::None(); 740 if (info.IsUninitialized()) return Representation::None();
745 if (info.IsSmi()) return Representation::Smi(); 741 if (info.IsSmi()) return Representation::Smi();
746 if (info.IsInteger32()) return Representation::Integer32(); 742 if (info.IsInteger32()) return Representation::Integer32();
747 if (info.IsDouble()) return Representation::Double(); 743 if (info.IsDouble()) return Representation::Double();
748 if (info.IsNumber()) return Representation::Double(); 744 if (info.IsNumber()) return Representation::Double();
749 return Representation::Tagged(); 745 return Representation::Tagged();
750 } 746 }
751 747
752 748
753 } } // namespace v8::internal 749 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698