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

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

Issue 12079024: Tag previously GENERIC stubs that potentially IC_Miss as MONOMORPHIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace explicit stub-check with != GENERIC check. Created 7 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/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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 487
488 488
489 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, 489 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
490 Handle<String> name, 490 Handle<String> name,
491 Code::Flags flags, 491 Code::Flags flags,
492 SmallMapList* types) { 492 SmallMapList* types) {
493 Handle<Object> object = GetInfo(ast_id); 493 Handle<Object> object = GetInfo(ast_id);
494 if (object->IsUndefined() || object->IsSmi()) return; 494 if (object->IsUndefined() || object->IsSmi()) return;
495 495
496 if (*object == 496 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) {
497 isolate_->builtins()->builtin(Builtins::kStoreIC_GlobalProxy)) {
498 // TODO(fschneider): We could collect the maps and signal that 497 // TODO(fschneider): We could collect the maps and signal that
499 // we need a generic store (or load) here. 498 // we need a generic store (or load) here.
500 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); 499 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC);
501 } else if (object->IsMap()) { 500 } else if (object->IsMap()) {
502 types->Add(Handle<Map>::cast(object), zone()); 501 types->Add(Handle<Map>::cast(object), zone());
503 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && 502 } else if (FLAG_collect_megamorphic_maps_from_stub_cache &&
504 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { 503 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
505 types->Reserve(4, zone()); 504 types->Reserve(4, zone());
506 ASSERT(object->IsCode()); 505 ASSERT(object->IsCode());
507 isolate_->stub_cache()->CollectMatchingMaps(types, 506 isolate_->stub_cache()->CollectMatchingMaps(types,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 USE(maybe_result); 712 USE(maybe_result);
714 #ifdef DEBUG 713 #ifdef DEBUG
715 Object* result = NULL; 714 Object* result = NULL;
716 // Dictionary has been allocated with sufficient size for all elements. 715 // Dictionary has been allocated with sufficient size for all elements.
717 ASSERT(maybe_result->ToObject(&result)); 716 ASSERT(maybe_result->ToObject(&result));
718 ASSERT(*dictionary_ == result); 717 ASSERT(*dictionary_ == result);
719 #endif 718 #endif
720 } 719 }
721 720
722 } } // namespace v8::internal 721 } } // 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