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

Side by Side Diff: src/compiler.cc

Issue 15993016: Remove the optimized construct stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 6 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/ast.h ('k') | src/heap.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 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 if (!function.is_null()) { 764 if (!function.is_null()) {
765 function->ReplaceCode(*code); 765 function->ReplaceCode(*code);
766 ASSERT(!function->IsOptimized()); 766 ASSERT(!function->IsOptimized());
767 } 767 }
768 768
769 // Set the expected number of properties for instances. 769 // Set the expected number of properties for instances.
770 FunctionLiteral* lit = info->function(); 770 FunctionLiteral* lit = info->function();
771 int expected = lit->expected_property_count(); 771 int expected = lit->expected_property_count();
772 SetExpectedNofPropertiesFromEstimate(shared, expected); 772 SetExpectedNofPropertiesFromEstimate(shared, expected);
773 773
774 // Set the optimization hints after performing lazy compilation, as
775 // these are not set when the function is set up as a lazily
776 // compiled function.
777 shared->SetThisPropertyAssignmentsInfo(
778 lit->has_only_simple_this_property_assignments(),
779 *lit->this_property_assignments());
780
781 // Check the function has compiled code. 774 // Check the function has compiled code.
782 ASSERT(shared->is_compiled()); 775 ASSERT(shared->is_compiled());
783 shared->set_code_age(0); 776 shared->set_code_age(0);
784 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); 777 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
785 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); 778 shared->set_dont_inline(lit->flags()->Contains(kDontInline));
786 shared->set_ast_node_count(lit->ast_node_count()); 779 shared->set_ast_node_count(lit->ast_node_count());
787 780
788 if (V8::UseCrankshaft() && 781 if (V8::UseCrankshaft() &&
789 !function.is_null() && 782 !function.is_null() &&
790 !shared->optimization_disabled()) { 783 !shared->optimization_disabled()) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 function_info->set_length(lit->parameter_count()); 1107 function_info->set_length(lit->parameter_count());
1115 function_info->set_formal_parameter_count(lit->parameter_count()); 1108 function_info->set_formal_parameter_count(lit->parameter_count());
1116 function_info->set_script(*script); 1109 function_info->set_script(*script);
1117 function_info->set_function_token_position(lit->function_token_position()); 1110 function_info->set_function_token_position(lit->function_token_position());
1118 function_info->set_start_position(lit->start_position()); 1111 function_info->set_start_position(lit->start_position());
1119 function_info->set_end_position(lit->end_position()); 1112 function_info->set_end_position(lit->end_position());
1120 function_info->set_is_expression(lit->is_expression()); 1113 function_info->set_is_expression(lit->is_expression());
1121 function_info->set_is_anonymous(lit->is_anonymous()); 1114 function_info->set_is_anonymous(lit->is_anonymous());
1122 function_info->set_is_toplevel(is_toplevel); 1115 function_info->set_is_toplevel(is_toplevel);
1123 function_info->set_inferred_name(*lit->inferred_name()); 1116 function_info->set_inferred_name(*lit->inferred_name());
1124 function_info->SetThisPropertyAssignmentsInfo(
1125 lit->has_only_simple_this_property_assignments(),
1126 *lit->this_property_assignments());
1127 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); 1117 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
1128 function_info->set_allows_lazy_compilation_without_context( 1118 function_info->set_allows_lazy_compilation_without_context(
1129 lit->AllowsLazyCompilationWithoutContext()); 1119 lit->AllowsLazyCompilationWithoutContext());
1130 function_info->set_language_mode(lit->language_mode()); 1120 function_info->set_language_mode(lit->language_mode());
1131 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); 1121 function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
1132 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); 1122 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
1133 function_info->set_ast_node_count(lit->ast_node_count()); 1123 function_info->set_ast_node_count(lit->ast_node_count());
1134 function_info->set_is_function(lit->is_function()); 1124 function_info->set_is_function(lit->is_function());
1135 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); 1125 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
1136 function_info->set_dont_inline(lit->flags()->Contains(kDontInline)); 1126 function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 } 1164 }
1175 } 1165 }
1176 1166
1177 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1167 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1178 Handle<Script>(info->script()), 1168 Handle<Script>(info->script()),
1179 Handle<Code>(info->code()), 1169 Handle<Code>(info->code()),
1180 info)); 1170 info));
1181 } 1171 }
1182 1172
1183 } } // namespace v8::internal 1173 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698