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

Side by Side Diff: src/compiler.cc

Issue 11421219: Remove extraneous forced rejuvenations in code aging (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « no previous file | src/flag-definitions.h » ('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 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE); 611 info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE);
612 } 612 }
613 result = MakeFunctionInfo(&info); 613 result = MakeFunctionInfo(&info);
614 if (extension == NULL && !result.is_null() && !result->dont_cache()) { 614 if (extension == NULL && !result.is_null() && !result->dont_cache()) {
615 compilation_cache->PutScript(source, context, result); 615 compilation_cache->PutScript(source, context, result);
616 } 616 }
617 } else { 617 } else {
618 if (result->ic_age() != HEAP->global_ic_age()) { 618 if (result->ic_age() != HEAP->global_ic_age()) {
619 result->ResetForNewContext(HEAP->global_ic_age()); 619 result->ResetForNewContext(HEAP->global_ic_age());
620 } 620 }
621 result->code()->MakeYoung();
622 } 621 }
623 622
624 if (result.is_null()) isolate->ReportPendingMessages(); 623 if (result.is_null()) isolate->ReportPendingMessages();
625 return result; 624 return result;
626 } 625 }
627 626
628 627
629 Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source, 628 Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
630 Handle<Context> context, 629 Handle<Context> context,
631 bool is_global, 630 bool is_global,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 result->is_extended_mode()); 672 result->is_extended_mode());
674 if (!result->dont_cache()) { 673 if (!result->dont_cache()) {
675 compilation_cache->PutEval( 674 compilation_cache->PutEval(
676 source, context, is_global, result, scope_position); 675 source, context, is_global, result, scope_position);
677 } 676 }
678 } 677 }
679 } else { 678 } else {
680 if (result->ic_age() != HEAP->global_ic_age()) { 679 if (result->ic_age() != HEAP->global_ic_age()) {
681 result->ResetForNewContext(HEAP->global_ic_age()); 680 result->ResetForNewContext(HEAP->global_ic_age());
682 } 681 }
683 result->code()->MakeYoung();
684 } 682 }
685 683
686 return result; 684 return result;
687 } 685 }
688 686
689 687
690 static bool InstallFullCode(CompilationInfo* info) { 688 static bool InstallFullCode(CompilationInfo* info) {
691 // Update the shared function info with the compiled code and the 689 // Update the shared function info with the compiled code and the
692 // scope info. Please note, that the order of the shared function 690 // scope info. Please note, that the order of the shared function
693 // info initialization is important since set_scope_info might 691 // info initialization is important since set_scope_info might
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 } 1068 }
1071 } 1069 }
1072 1070
1073 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1071 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1074 Handle<Script>(info->script()), 1072 Handle<Script>(info->script()),
1075 Handle<Code>(info->code()), 1073 Handle<Code>(info->code()),
1076 info)); 1074 info));
1077 } 1075 }
1078 1076
1079 } } // namespace v8::internal 1077 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698