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

Side by Side Diff: src/objects.cc

Issue 23584004: Remove OptimizedCodeEntry *sigh*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: 1783 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
1784 case EXTERNAL_INT_ARRAY_TYPE: 1784 case EXTERNAL_INT_ARRAY_TYPE:
1785 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: 1785 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
1786 case EXTERNAL_FLOAT_ARRAY_TYPE: 1786 case EXTERNAL_FLOAT_ARRAY_TYPE:
1787 case EXTERNAL_DOUBLE_ARRAY_TYPE: 1787 case EXTERNAL_DOUBLE_ARRAY_TYPE:
1788 break; 1788 break;
1789 case SHARED_FUNCTION_INFO_TYPE: { 1789 case SHARED_FUNCTION_INFO_TYPE: {
1790 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v); 1790 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v);
1791 break; 1791 break;
1792 } 1792 }
1793 case OPTIMIZED_CODE_ENTRY_TYPE: {
1794 OptimizedCodeEntry::BodyDescriptor::IterateBody(this, v);
1795 break;
1796 }
1797 1793
1798 #define MAKE_STRUCT_CASE(NAME, Name, name) \ 1794 #define MAKE_STRUCT_CASE(NAME, Name, name) \
1799 case NAME##_TYPE: 1795 case NAME##_TYPE:
1800 STRUCT_LIST(MAKE_STRUCT_CASE) 1796 STRUCT_LIST(MAKE_STRUCT_CASE)
1801 #undef MAKE_STRUCT_CASE 1797 #undef MAKE_STRUCT_CASE
1802 if (type == ALLOCATION_SITE_TYPE) { 1798 if (type == ALLOCATION_SITE_TYPE) {
1803 AllocationSite::BodyDescriptor::IterateBody(this, v); 1799 AllocationSite::BodyDescriptor::IterateBody(this, v);
1804 } else { 1800 } else {
1805 StructBodyDescriptor::IterateBody(this, object_size, v); 1801 StructBodyDescriptor::IterateBody(this, object_size, v);
1806 } 1802 }
(...skipping 7612 matching lines...) Expand 10 before | Expand all | Expand 10 after
9419 ASSERT(shrink_by % kEntryLength == 0); 9415 ASSERT(shrink_by % kEntryLength == 0);
9420 ASSERT(shrink_by <= code_map->length() - kEntriesStart); 9416 ASSERT(shrink_by <= code_map->length() - kEntriesStart);
9421 // Always trim even when array is cleared because of heap verifier. 9417 // Always trim even when array is cleared because of heap verifier.
9422 RightTrimFixedArray<FROM_GC>(GetHeap(), code_map, shrink_by); 9418 RightTrimFixedArray<FROM_GC>(GetHeap(), code_map, shrink_by);
9423 if (code_map->length() == kEntriesStart) { 9419 if (code_map->length() == kEntriesStart) {
9424 ClearOptimizedCodeMap(); 9420 ClearOptimizedCodeMap();
9425 } 9421 }
9426 } 9422 }
9427 9423
9428 9424
9429 void OptimizedCodeEntry::Kill() {
9430 set_function(NULL, SKIP_WRITE_BARRIER);
9431 set_code(NULL, SKIP_WRITE_BARRIER);
9432 set_native_context(NULL, SKIP_WRITE_BARRIER);
9433 set_literals(NULL, SKIP_WRITE_BARRIER);
9434 set_cacheable(false);
9435 }
9436
9437
9438 bool JSFunction::CompileLazy(Handle<JSFunction> function, 9425 bool JSFunction::CompileLazy(Handle<JSFunction> function,
9439 ClearExceptionFlag flag) { 9426 ClearExceptionFlag flag) {
9440 bool result = true; 9427 bool result = true;
9441 if (function->shared()->is_compiled()) { 9428 if (function->shared()->is_compiled()) {
9442 function->ReplaceCode(function->shared()->code()); 9429 function->ReplaceCode(function->shared()->code());
9443 } else { 9430 } else {
9444 ASSERT(function->shared()->allows_lazy_compilation()); 9431 ASSERT(function->shared()->allows_lazy_compilation());
9445 CompilationInfoWithZone info(function); 9432 CompilationInfoWithZone info(function);
9446 result = CompileLazyHelper(&info, flag); 9433 result = CompileLazyHelper(&info, flag);
9447 ASSERT(!result || function->is_compiled()); 9434 ASSERT(!result || function->is_compiled());
(...skipping 6532 matching lines...) Expand 10 before | Expand all | Expand 10 after
15980 #define ERROR_MESSAGES_TEXTS(C, T) T, 15967 #define ERROR_MESSAGES_TEXTS(C, T) T,
15981 static const char* error_messages_[] = { 15968 static const char* error_messages_[] = {
15982 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 15969 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
15983 }; 15970 };
15984 #undef ERROR_MESSAGES_TEXTS 15971 #undef ERROR_MESSAGES_TEXTS
15985 return error_messages_[reason]; 15972 return error_messages_[reason];
15986 } 15973 }
15987 15974
15988 15975
15989 } } // namespace v8::internal 15976 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698