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

Side by Side Diff: src/stub-cache.cc

Issue 5188006: Push version 2.5.7 to trunk.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 1 month 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/stub-cache.h ('k') | src/utils.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 Object* probe; 813 Object* probe;
814 { MaybeObject* maybe_probe = ProbeCache(flags); 814 { MaybeObject* maybe_probe = ProbeCache(flags);
815 if (!maybe_probe->ToObject(&probe)) return maybe_probe; 815 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
816 } 816 }
817 if (!probe->IsUndefined()) return probe; 817 if (!probe->IsUndefined()) return probe;
818 StubCompiler compiler; 818 StubCompiler compiler;
819 return FillCache(compiler.CompileCallInitialize(flags)); 819 return FillCache(compiler.CompileCallInitialize(flags));
820 } 820 }
821 821
822 822
823 Handle<Code> StubCache::ComputeCallInitialize(int argc, InLoopFlag in_loop) {
824 if (in_loop == IN_LOOP) {
825 // Force the creation of the corresponding stub outside loops,
826 // because it may be used when clearing the ICs later - it is
827 // possible for a series of IC transitions to lose the in-loop
828 // information, and the IC clearing code can't generate a stub
829 // that it needs so we need to ensure it is generated already.
830 ComputeCallInitialize(argc, NOT_IN_LOOP);
831 }
832 CALL_HEAP_FUNCTION(ComputeCallInitialize(argc, in_loop, Code::CALL_IC), Code);
833 }
834
835
836 Handle<Code> StubCache::ComputeKeyedCallInitialize(int argc,
837 InLoopFlag in_loop) {
838 if (in_loop == IN_LOOP) {
839 // Force the creation of the corresponding stub outside loops,
840 // because it may be used when clearing the ICs later - it is
841 // possible for a series of IC transitions to lose the in-loop
842 // information, and the IC clearing code can't generate a stub
843 // that it needs so we need to ensure it is generated already.
844 ComputeKeyedCallInitialize(argc, NOT_IN_LOOP);
845 }
846 CALL_HEAP_FUNCTION(
847 ComputeCallInitialize(argc, in_loop, Code::KEYED_CALL_IC), Code);
848 }
849
850
823 MaybeObject* StubCache::ComputeCallPreMonomorphic(int argc, 851 MaybeObject* StubCache::ComputeCallPreMonomorphic(int argc,
824 InLoopFlag in_loop, 852 InLoopFlag in_loop,
825 Code::Kind kind) { 853 Code::Kind kind) {
826 Code::Flags flags = 854 Code::Flags flags =
827 Code::ComputeFlags(kind, in_loop, PREMONOMORPHIC, NORMAL, argc); 855 Code::ComputeFlags(kind, in_loop, PREMONOMORPHIC, NORMAL, argc);
828 Object* probe; 856 Object* probe;
829 { MaybeObject* maybe_probe = ProbeCache(flags); 857 { MaybeObject* maybe_probe = ProbeCache(flags);
830 if (!maybe_probe->ToObject(&probe)) return maybe_probe; 858 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
831 } 859 }
832 if (!probe->IsUndefined()) return probe; 860 if (!probe->IsUndefined()) return probe;
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 expected_receiver_type_ = 1539 expected_receiver_type_ =
1512 FunctionTemplateInfo::cast(signature->receiver()); 1540 FunctionTemplateInfo::cast(signature->receiver());
1513 } 1541 }
1514 } 1542 }
1515 1543
1516 is_simple_api_call_ = true; 1544 is_simple_api_call_ = true;
1517 } 1545 }
1518 1546
1519 1547
1520 } } // namespace v8::internal 1548 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698