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

Side by Side Diff: src/factory.cc

Issue 184923002: Clear optimized code cache in shared function info when code gets deoptimized (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix assert 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 961 }
962 result->set_literals(*literals); 962 result->set_literals(*literals);
963 } 963 }
964 964
965 if (index > 0) { 965 if (index > 0) {
966 // Caching of optimized code enabled and optimized code found. 966 // Caching of optimized code enabled and optimized code found.
967 FixedArray* literals = 967 FixedArray* literals =
968 function_info->GetLiteralsFromOptimizedCodeMap(index); 968 function_info->GetLiteralsFromOptimizedCodeMap(index);
969 if (literals != NULL) result->set_literals(literals); 969 if (literals != NULL) result->set_literals(literals);
970 Code* code = function_info->GetCodeFromOptimizedCodeMap(index); 970 Code* code = function_info->GetCodeFromOptimizedCodeMap(index);
971 ASSERT(!code->marked_for_deoptimization());
971 result->ReplaceCode(code); 972 result->ReplaceCode(code);
972 return result; 973 return result;
973 } 974 }
974 975
975 if (isolate()->use_crankshaft() && 976 if (isolate()->use_crankshaft() &&
976 FLAG_always_opt && 977 FLAG_always_opt &&
977 result->is_compiled() && 978 result->is_compiled() &&
978 !function_info->is_toplevel() && 979 !function_info->is_toplevel() &&
979 function_info->allows_lazy_compilation() && 980 function_info->allows_lazy_compilation() &&
980 !function_info->optimization_disabled() && 981 !function_info->optimization_disabled() &&
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 return Handle<Object>::null(); 1990 return Handle<Object>::null();
1990 } 1991 }
1991 1992
1992 1993
1993 Handle<Object> Factory::ToBoolean(bool value) { 1994 Handle<Object> Factory::ToBoolean(bool value) {
1994 return value ? true_value() : false_value(); 1995 return value ? true_value() : false_value();
1995 } 1996 }
1996 1997
1997 1998
1998 } } // namespace v8::internal 1999 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698