| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 } | 823 } |
| 824 | 824 |
| 825 // Set the expected number of properties for instances. | 825 // Set the expected number of properties for instances. |
| 826 FunctionLiteral* lit = info->function(); | 826 FunctionLiteral* lit = info->function(); |
| 827 int expected = lit->expected_property_count(); | 827 int expected = lit->expected_property_count(); |
| 828 SetExpectedNofPropertiesFromEstimate(shared, expected); | 828 SetExpectedNofPropertiesFromEstimate(shared, expected); |
| 829 | 829 |
| 830 // Check the function has compiled code. | 830 // Check the function has compiled code. |
| 831 ASSERT(shared->is_compiled()); | 831 ASSERT(shared->is_compiled()); |
| 832 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); | 832 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
| 833 shared->set_dont_osr(lit->flags()->Contains(kDontOsr)); |
| 833 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); | 834 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); |
| 834 shared->set_ast_node_count(lit->ast_node_count()); | 835 shared->set_ast_node_count(lit->ast_node_count()); |
| 835 | 836 |
| 836 if (V8::UseCrankshaft() && | 837 if (V8::UseCrankshaft() && |
| 837 !function.is_null() && | 838 !function.is_null() && |
| 838 !shared->optimization_disabled()) { | 839 !shared->optimization_disabled()) { |
| 839 // If we're asked to always optimize, we compile the optimized | 840 // If we're asked to always optimize, we compile the optimized |
| 840 // version of the function right away - unless the debugger is | 841 // version of the function right away - unless the debugger is |
| 841 // active as it makes no sense to compile optimized code then. | 842 // active as it makes no sense to compile optimized code then. |
| 842 if (FLAG_always_opt && | 843 if (FLAG_always_opt && |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 function_info->set_inferred_name(*lit->inferred_name()); | 1171 function_info->set_inferred_name(*lit->inferred_name()); |
| 1171 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); | 1172 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); |
| 1172 function_info->set_allows_lazy_compilation_without_context( | 1173 function_info->set_allows_lazy_compilation_without_context( |
| 1173 lit->AllowsLazyCompilationWithoutContext()); | 1174 lit->AllowsLazyCompilationWithoutContext()); |
| 1174 function_info->set_language_mode(lit->language_mode()); | 1175 function_info->set_language_mode(lit->language_mode()); |
| 1175 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); | 1176 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); |
| 1176 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); | 1177 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); |
| 1177 function_info->set_ast_node_count(lit->ast_node_count()); | 1178 function_info->set_ast_node_count(lit->ast_node_count()); |
| 1178 function_info->set_is_function(lit->is_function()); | 1179 function_info->set_is_function(lit->is_function()); |
| 1179 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); | 1180 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); |
| 1181 function_info->set_dont_osr(lit->flags()->Contains(kDontOsr)); |
| 1180 function_info->set_dont_inline(lit->flags()->Contains(kDontInline)); | 1182 function_info->set_dont_inline(lit->flags()->Contains(kDontInline)); |
| 1181 function_info->set_dont_cache(lit->flags()->Contains(kDontCache)); | 1183 function_info->set_dont_cache(lit->flags()->Contains(kDontCache)); |
| 1182 function_info->set_is_generator(lit->is_generator()); | 1184 function_info->set_is_generator(lit->is_generator()); |
| 1183 } | 1185 } |
| 1184 | 1186 |
| 1185 | 1187 |
| 1186 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 1188 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
| 1187 CompilationInfo* info, | 1189 CompilationInfo* info, |
| 1188 Handle<SharedFunctionInfo> shared) { | 1190 Handle<SharedFunctionInfo> shared) { |
| 1189 // SharedFunctionInfo is passed separately, because if CompilationInfo | 1191 // SharedFunctionInfo is passed separately, because if CompilationInfo |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1218 } | 1220 } |
| 1219 } | 1221 } |
| 1220 | 1222 |
| 1221 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1223 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
| 1222 Handle<Script>(info->script()), | 1224 Handle<Script>(info->script()), |
| 1223 Handle<Code>(info->code()), | 1225 Handle<Code>(info->code()), |
| 1224 info)); | 1226 info)); |
| 1225 } | 1227 } |
| 1226 | 1228 |
| 1227 } } // namespace v8::internal | 1229 } } // namespace v8::internal |
| OLD | NEW |