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

Side by Side Diff: src/runtime.cc

Issue 189603006: Do not overwrite already optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/optimizing-compiler-thread.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 8745 matching lines...) Expand 10 before | Expand all | Expand 10 after
8756 } 8756 }
8757 } 8757 }
8758 8758
8759 // Failed. 8759 // Failed.
8760 if (FLAG_trace_osr) { 8760 if (FLAG_trace_osr) {
8761 PrintF("[OSR - Failed: "); 8761 PrintF("[OSR - Failed: ");
8762 function->PrintName(); 8762 function->PrintName();
8763 PrintF(" at AST id %d]\n", ast_id.ToInt()); 8763 PrintF(" at AST id %d]\n", ast_id.ToInt());
8764 } 8764 }
8765 8765
8766 function->ReplaceCode(function->shared()->code()); 8766 if (!function->IsOptimized()) {
8767 function->ReplaceCode(function->shared()->code());
8768 }
8767 return NULL; 8769 return NULL;
8768 } 8770 }
8769 8771
8770 8772
8771 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) { 8773 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) {
8772 SealHandleScope shs(isolate); 8774 SealHandleScope shs(isolate);
8773 ASSERT(args.length() == 2 || args.length() == 3); 8775 ASSERT(args.length() == 2 || args.length() == 3);
8774 #ifdef DEBUG 8776 #ifdef DEBUG
8775 CONVERT_SMI_ARG_CHECKED(interval, 0); 8777 CONVERT_SMI_ARG_CHECKED(interval, 0);
8776 CONVERT_SMI_ARG_CHECKED(timeout, 1); 8778 CONVERT_SMI_ARG_CHECKED(timeout, 1);
(...skipping 6218 matching lines...) Expand 10 before | Expand all | Expand 10 after
14995 // Handle last resort GC and make sure to allow future allocations 14997 // Handle last resort GC and make sure to allow future allocations
14996 // to grow the heap without causing GCs (if possible). 14998 // to grow the heap without causing GCs (if possible).
14997 isolate->counters()->gc_last_resort_from_js()->Increment(); 14999 isolate->counters()->gc_last_resort_from_js()->Increment();
14998 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 15000 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14999 "Runtime::PerformGC"); 15001 "Runtime::PerformGC");
15000 } 15002 }
15001 } 15003 }
15002 15004
15003 15005
15004 } } // namespace v8::internal 15006 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/optimizing-compiler-thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698