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

Side by Side Diff: src/ic.cc

Issue 163363003: Don't mix handler flags into regular flag compuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/ic-ia32.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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 number_of_valid_types++; 637 number_of_valid_types++;
638 if (handler_to_overwrite >= 0) { 638 if (handler_to_overwrite >= 0) {
639 handlers.Set(handler_to_overwrite, code); 639 handlers.Set(handler_to_overwrite, code);
640 } else { 640 } else {
641 types.Add(type); 641 types.Add(type);
642 handlers.Add(code); 642 handlers.Add(code);
643 } 643 }
644 644
645 Handle<Code> ic = isolate()->stub_cache()->ComputePolymorphicIC( 645 Handle<Code> ic = isolate()->stub_cache()->ComputePolymorphicIC(
646 &types, &handlers, number_of_valid_types, name, extra_ic_state()); 646 kind(), &types, &handlers, number_of_valid_types, name, extra_ic_state());
647 set_target(*ic); 647 set_target(*ic);
648 return true; 648 return true;
649 } 649 }
650 650
651 651
652 Handle<HeapType> IC::CurrentTypeOf(Handle<Object> object, Isolate* isolate) { 652 Handle<HeapType> IC::CurrentTypeOf(Handle<Object> object, Isolate* isolate) {
653 return object->IsJSGlobalObject() 653 return object->IsJSGlobalObject()
654 ? HeapType::Constant(Handle<JSGlobalObject>::cast(object), isolate) 654 ? HeapType::Constant(Handle<JSGlobalObject>::cast(object), isolate)
655 : HeapType::OfCurrently(object, isolate); 655 : HeapType::OfCurrently(object, isolate);
656 } 656 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 template 689 template
690 Handle<HeapType> IC::MapToType<HeapType>(Handle<Map> map, Isolate* region); 690 Handle<HeapType> IC::MapToType<HeapType>(Handle<Map> map, Isolate* region);
691 691
692 692
693 void IC::UpdateMonomorphicIC(Handle<HeapType> type, 693 void IC::UpdateMonomorphicIC(Handle<HeapType> type,
694 Handle<Code> handler, 694 Handle<Code> handler,
695 Handle<String> name) { 695 Handle<String> name) {
696 if (!handler->is_handler()) return set_target(*handler); 696 if (!handler->is_handler()) return set_target(*handler);
697 Handle<Code> ic = isolate()->stub_cache()->ComputeMonomorphicIC( 697 Handle<Code> ic = isolate()->stub_cache()->ComputeMonomorphicIC(
698 name, type, handler, extra_ic_state()); 698 kind(), name, type, handler, extra_ic_state());
699 set_target(*ic); 699 set_target(*ic);
700 } 700 }
701 701
702 702
703 void IC::CopyICToMegamorphicCache(Handle<String> name) { 703 void IC::CopyICToMegamorphicCache(Handle<String> name) {
704 TypeHandleList types; 704 TypeHandleList types;
705 CodeHandleList handlers; 705 CodeHandleList handlers;
706 target()->FindAllTypes(&types); 706 target()->FindAllTypes(&types);
707 if (!target()->FindHandlers(&handlers, types.length())) return; 707 if (!target()->FindHandlers(&handlers, types.length())) return;
708 for (int i = 0; i < types.length(); i++) { 708 for (int i = 0; i < types.length(); i++) {
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2815 #undef ADDR 2815 #undef ADDR
2816 }; 2816 };
2817 2817
2818 2818
2819 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2819 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2820 return IC_utilities[id]; 2820 return IC_utilities[id];
2821 } 2821 }
2822 2822
2823 2823
2824 } } // namespace v8::internal 2824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698