OLD | NEW |
---|---|
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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 LanguageMode language_mode = info->function()->language_mode(); | 936 LanguageMode language_mode = info->function()->language_mode(); |
937 info->SetLanguageMode(language_mode); | 937 info->SetLanguageMode(language_mode); |
938 shared->set_language_mode(language_mode); | 938 shared->set_language_mode(language_mode); |
939 info->SaveHandles(); | 939 info->SaveHandles(); |
940 | 940 |
941 if (Rewriter::Rewrite(*info) && Scope::Analyze(*info)) { | 941 if (Rewriter::Rewrite(*info) && Scope::Analyze(*info)) { |
942 OptimizingCompiler* compiler = | 942 OptimizingCompiler* compiler = |
943 new(info->zone()) OptimizingCompiler(*info); | 943 new(info->zone()) OptimizingCompiler(*info); |
944 OptimizingCompiler::Status status = compiler->CreateGraph(); | 944 OptimizingCompiler::Status status = compiler->CreateGraph(); |
945 if (status == OptimizingCompiler::SUCCEEDED) { | 945 if (status == OptimizingCompiler::SUCCEEDED) { |
946 // Do a scavenge to put off the next scavenge as far as possible. | 946 // Do a scavenge to put off the next scavenge as far as possible. |
Jakob Kummerow
2013/03/18 10:22:19
Please move this comment along with the line it ap
| |
947 // This may ease the issue that GVN blocks the next scavenge. | 947 // This may ease the issue that GVN blocks the next scavenge. |
948 isolate->heap()->CollectGarbage(NEW_SPACE, "parallel recompile"); | |
949 shared->code()->set_profiler_ticks(0); | 948 shared->code()->set_profiler_ticks(0); |
950 info.Detach(); | 949 info.Detach(); |
950 isolate->heap()->CollectGarbage(NEW_SPACE, "parallel recompile"); | |
951 isolate->optimizing_compiler_thread()->QueueForOptimization(compiler); | 951 isolate->optimizing_compiler_thread()->QueueForOptimization(compiler); |
952 } else if (status == OptimizingCompiler::BAILED_OUT) { | 952 } else if (status == OptimizingCompiler::BAILED_OUT) { |
953 isolate->clear_pending_exception(); | 953 isolate->clear_pending_exception(); |
954 InstallFullCode(*info); | 954 InstallFullCode(*info); |
955 } | 955 } |
956 } | 956 } |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
960 if (shared->code()->stack_check_patched_for_osr()) { | 960 if (shared->code()->stack_check_patched_for_osr()) { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1157 } | 1157 } |
1158 } | 1158 } |
1159 | 1159 |
1160 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1160 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1161 Handle<Script>(info->script()), | 1161 Handle<Script>(info->script()), |
1162 Handle<Code>(info->code()), | 1162 Handle<Code>(info->code()), |
1163 info)); | 1163 info)); |
1164 } | 1164 } |
1165 | 1165 |
1166 } } // namespace v8::internal | 1166 } } // namespace v8::internal |
OLD | NEW |