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

Side by Side Diff: src/runtime.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 unified diff | Download patch | Annotate | Revision Log
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 4300 matching lines...) Expand 10 before | Expand all | Expand 10 after
4311 4311
4312 Handle<JSFunction> function = args.at<JSFunction>(0); 4312 Handle<JSFunction> function = args.at<JSFunction>(0);
4313 #ifdef DEBUG 4313 #ifdef DEBUG
4314 if (FLAG_trace_lazy) { 4314 if (FLAG_trace_lazy) {
4315 PrintF("[lazy: "); 4315 PrintF("[lazy: ");
4316 function->shared()->name()->Print(); 4316 function->shared()->name()->Print();
4317 PrintF("]\n"); 4317 PrintF("]\n");
4318 } 4318 }
4319 #endif 4319 #endif
4320 4320
4321 // Compile the target function. 4321 // Compile the target function. Here we compile using CompileLazyInLoop in
4322 // order to get the optimized version. This helps code like delta-blue
4323 // that calls performance-critical routines through constructors. A
4324 // constructor call doesn't use a CallIC, it uses a LoadIC followed by a
4325 // direct call. Since the in-loop tracking takes place through CallICs
4326 // this means that things called through constructors are never known to
4327 // be in loops. We compile them as if they are in loops here just in case.
4322 ASSERT(!function->is_compiled()); 4328 ASSERT(!function->is_compiled());
4323 if (!CompileLazy(function, KEEP_EXCEPTION)) { 4329 if (!CompileLazyInLoop(function, KEEP_EXCEPTION)) {
4324 return Failure::Exception(); 4330 return Failure::Exception();
4325 } 4331 }
4326 4332
4327 return function->code(); 4333 return function->code();
4328 } 4334 }
4329 4335
4330 4336
4331 static Object* Runtime_GetCalledFunction(Arguments args) { 4337 static Object* Runtime_GetCalledFunction(Arguments args) {
4332 HandleScope scope; 4338 HandleScope scope;
4333 ASSERT(args.length() == 0); 4339 ASSERT(args.length() == 0);
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after
7037 } else { 7043 } else {
7038 // Handle last resort GC and make sure to allow future allocations 7044 // Handle last resort GC and make sure to allow future allocations
7039 // to grow the heap without causing GCs (if possible). 7045 // to grow the heap without causing GCs (if possible).
7040 Counters::gc_last_resort_from_js.Increment(); 7046 Counters::gc_last_resort_from_js.Increment();
7041 Heap::CollectAllGarbage(); 7047 Heap::CollectAllGarbage();
7042 } 7048 }
7043 } 7049 }
7044 7050
7045 7051
7046 } } // namespace v8::internal 7052 } } // namespace v8::internal
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698