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

Unified Diff: src/codegen.cc

Issue 115744: This patch much improves our tracking of whether function is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/codegen.cc
===================================================================
--- src/codegen.cc (revision 2034)
+++ src/codegen.cc (working copy)
@@ -170,7 +170,9 @@
CodeDesc desc;
cgen.masm()->GetCode(&desc);
ZoneScopeInfo sinfo(flit->scope());
- Code::Flags flags = Code::ComputeFlags(Code::FUNCTION);
+ InlineCacheInLoop in_loop =
+ (cgen.loop_nesting() != 0) ? IN_LOOP : NOT_IN_LOOP;
+ Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop);
Handle<Code> code = Factory::NewCode(desc,
&sinfo,
flags,
@@ -322,20 +324,21 @@
}
-Handle<Code> CodeGenerator::ComputeCallInitialize(int argc) {
- CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc), Code);
+Handle<Code> CodeGenerator::ComputeCallInitialize(
+ int argc,
+ InlineCacheInLoop in_loop) {
+ if (in_loop) {
Kevin Millikin (Chromium) 2009/05/25 11:00:42 My opinion is mixed about making these two value,
+ // Force the creation of the corresponding stub outside loops,
+ // because it may be used when clearing the ICs later - it is
+ // possible for a series of IC transitions to lose the in-loop
+ // information, and the IC clearing code can't generate a stub
+ // that it needs so we need to ensure it is generated already.
+ ComputeCallInitialize(argc, NOT_IN_LOOP);
+ }
+ CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc, in_loop), Code);
}
-Handle<Code> CodeGenerator::ComputeCallInitializeInLoop(int argc) {
- // Force the creation of the corresponding stub outside loops,
- // because it will be used when clearing the ICs later - when we
- // don't know if we're inside a loop or not.
- ComputeCallInitialize(argc);
- CALL_HEAP_FUNCTION(StubCache::ComputeCallInitializeInLoop(argc), Code);
-}
-
-
void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) {
int length = declarations->length();
int globals = 0;

Powered by Google App Engine
This is Rietveld 408576698