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

Side by Side Diff: src/objects-inl.h

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 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 5419 matching lines...) Expand 10 before | Expand all | Expand 10 after
5430 set_code(code); 5430 set_code(code);
5431 5431
5432 // Add/remove the function from the list of optimized functions for this 5432 // Add/remove the function from the list of optimized functions for this
5433 // context based on the state change. 5433 // context based on the state change.
5434 if (!was_optimized && is_optimized) { 5434 if (!was_optimized && is_optimized) {
5435 context()->native_context()->AddOptimizedFunction(this); 5435 context()->native_context()->AddOptimizedFunction(this);
5436 } 5436 }
5437 if (was_optimized && !is_optimized) { 5437 if (was_optimized && !is_optimized) {
5438 // TODO(titzer): linear in the number of optimized functions; fix! 5438 // TODO(titzer): linear in the number of optimized functions; fix!
5439 context()->native_context()->RemoveOptimizedFunction(this); 5439 context()->native_context()->RemoveOptimizedFunction(this);
5440 shared()->EvictFromOptimizedCodeMap(context()->native_context(),
5441 "Removing optimized code");
5442 } 5440 }
5443 } 5441 }
5444 5442
5445 5443
5446 Context* JSFunction::context() { 5444 Context* JSFunction::context() {
5447 return Context::cast(READ_FIELD(this, kContextOffset)); 5445 return Context::cast(READ_FIELD(this, kContextOffset));
5448 } 5446 }
5449 5447
5450 5448
5451 void JSFunction::set_context(Object* value) { 5449 void JSFunction::set_context(Object* value) {
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
6750 #undef READ_UINT32_FIELD 6748 #undef READ_UINT32_FIELD
6751 #undef WRITE_UINT32_FIELD 6749 #undef WRITE_UINT32_FIELD
6752 #undef READ_SHORT_FIELD 6750 #undef READ_SHORT_FIELD
6753 #undef WRITE_SHORT_FIELD 6751 #undef WRITE_SHORT_FIELD
6754 #undef READ_BYTE_FIELD 6752 #undef READ_BYTE_FIELD
6755 #undef WRITE_BYTE_FIELD 6753 #undef WRITE_BYTE_FIELD
6756 6754
6757 } } // namespace v8::internal 6755 } } // namespace v8::internal
6758 6756
6759 #endif // V8_OBJECTS_INL_H_ 6757 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.cc ('K') | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698