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

Side by Side Diff: src/compiler.cc

Issue 10910161: Partial ia32 implementation of optimized try/catch (by Kevin Millikin) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed build. Created 8 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/ast.cc ('k') | src/deoptimizer.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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // these are not set when the function is set up as a lazily 703 // these are not set when the function is set up as a lazily
704 // compiled function. 704 // compiled function.
705 shared->SetThisPropertyAssignmentsInfo( 705 shared->SetThisPropertyAssignmentsInfo(
706 lit->has_only_simple_this_property_assignments(), 706 lit->has_only_simple_this_property_assignments(),
707 *lit->this_property_assignments()); 707 *lit->this_property_assignments());
708 708
709 // Check the function has compiled code. 709 // Check the function has compiled code.
710 ASSERT(shared->is_compiled()); 710 ASSERT(shared->is_compiled());
711 shared->set_code_age(0); 711 shared->set_code_age(0);
712 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); 712 shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
713 shared->set_dont_osr(lit->flags()->Contains(kDontOsr));
713 shared->set_dont_inline(lit->flags()->Contains(kDontInline)); 714 shared->set_dont_inline(lit->flags()->Contains(kDontInline));
714 shared->set_ast_node_count(lit->ast_node_count()); 715 shared->set_ast_node_count(lit->ast_node_count());
715 716
716 if (V8::UseCrankshaft() && 717 if (V8::UseCrankshaft() &&
717 !function.is_null() && 718 !function.is_null() &&
718 !shared->optimization_disabled()) { 719 !shared->optimization_disabled()) {
719 // If we're asked to always optimize, we compile the optimized 720 // If we're asked to always optimize, we compile the optimized
720 // version of the function right away - unless the debugger is 721 // version of the function right away - unless the debugger is
721 // active as it makes no sense to compile optimized code then. 722 // active as it makes no sense to compile optimized code then.
722 if (FLAG_always_opt && 723 if (FLAG_always_opt &&
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 *lit->this_property_assignments()); 999 *lit->this_property_assignments());
999 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); 1000 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
1000 function_info->set_allows_lazy_compilation_without_context( 1001 function_info->set_allows_lazy_compilation_without_context(
1001 lit->AllowsLazyCompilationWithoutContext()); 1002 lit->AllowsLazyCompilationWithoutContext());
1002 function_info->set_language_mode(lit->language_mode()); 1003 function_info->set_language_mode(lit->language_mode());
1003 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); 1004 function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
1004 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); 1005 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
1005 function_info->set_ast_node_count(lit->ast_node_count()); 1006 function_info->set_ast_node_count(lit->ast_node_count());
1006 function_info->set_is_function(lit->is_function()); 1007 function_info->set_is_function(lit->is_function());
1007 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize)); 1008 function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
1009 function_info->set_dont_osr(lit->flags()->Contains(kDontOsr));
1008 function_info->set_dont_inline(lit->flags()->Contains(kDontInline)); 1010 function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
1009 function_info->set_dont_cache(lit->flags()->Contains(kDontCache)); 1011 function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
1010 } 1012 }
1011 1013
1012 1014
1013 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, 1015 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
1014 CompilationInfo* info, 1016 CompilationInfo* info,
1015 Handle<SharedFunctionInfo> shared) { 1017 Handle<SharedFunctionInfo> shared) {
1016 // SharedFunctionInfo is passed separately, because if CompilationInfo 1018 // SharedFunctionInfo is passed separately, because if CompilationInfo
1017 // was created using Script object, it will not have it. 1019 // was created using Script object, it will not have it.
(...skipping 25 matching lines...) Expand all
1043 } 1045 }
1044 } 1046 }
1045 1047
1046 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1048 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1047 Handle<Script>(info->script()), 1049 Handle<Script>(info->script()),
1048 Handle<Code>(info->code()), 1050 Handle<Code>(info->code()),
1049 info)); 1051 info));
1050 } 1052 }
1051 1053
1052 } } // namespace v8::internal 1054 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698