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

Side by Side Diff: src/compiler.cc

Issue 8505012: A small collection of cleanup in the parser and AST. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/liveedit.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 728
729 // Sets the function info on a function. 729 // Sets the function info on a function.
730 // The start_position points to the first '(' character after the function name 730 // The start_position points to the first '(' character after the function name
731 // in the full script source. When counting characters in the script source the 731 // in the full script source. When counting characters in the script source the
732 // the first character is number 0 (not 1). 732 // the first character is number 0 (not 1).
733 void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info, 733 void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
734 FunctionLiteral* lit, 734 FunctionLiteral* lit,
735 bool is_toplevel, 735 bool is_toplevel,
736 Handle<Script> script) { 736 Handle<Script> script) {
737 function_info->set_length(lit->num_parameters()); 737 function_info->set_length(lit->parameter_count());
738 function_info->set_formal_parameter_count(lit->num_parameters()); 738 function_info->set_formal_parameter_count(lit->parameter_count());
739 function_info->set_script(*script); 739 function_info->set_script(*script);
740 function_info->set_function_token_position(lit->function_token_position()); 740 function_info->set_function_token_position(lit->function_token_position());
741 function_info->set_start_position(lit->start_position()); 741 function_info->set_start_position(lit->start_position());
742 function_info->set_end_position(lit->end_position()); 742 function_info->set_end_position(lit->end_position());
743 function_info->set_is_expression(lit->is_expression()); 743 function_info->set_is_expression(lit->is_expression());
744 function_info->set_is_anonymous(lit->is_anonymous()); 744 function_info->set_is_anonymous(lit->is_anonymous());
745 function_info->set_is_toplevel(is_toplevel); 745 function_info->set_is_toplevel(is_toplevel);
746 function_info->set_inferred_name(*lit->inferred_name()); 746 function_info->set_inferred_name(*lit->inferred_name());
747 function_info->SetThisPropertyAssignmentsInfo( 747 function_info->SetThisPropertyAssignmentsInfo(
748 lit->has_only_simple_this_property_assignments(), 748 lit->has_only_simple_this_property_assignments(),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 } 788 }
789 789
790 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 790 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
791 Handle<Script>(info->script()), 791 Handle<Script>(info->script()),
792 Handle<Code>(info->code()), 792 Handle<Code>(info->code()),
793 info)); 793 info));
794 } 794 }
795 795
796 } } // namespace v8::internal 796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698