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

Side by Side Diff: src/compiler.cc

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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/code-stubs.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Deleted: svn:executable
- *
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 if (result.is_null()) { 471 if (result.is_null()) {
472 // No cache entry found. Do pre-parsing, if it makes sense, and compile 472 // No cache entry found. Do pre-parsing, if it makes sense, and compile
473 // the script. 473 // the script.
474 // Building preparse data that is only used immediately after is only a 474 // Building preparse data that is only used immediately after is only a
475 // saving if we might skip building the AST for lazily compiled functions. 475 // saving if we might skip building the AST for lazily compiled functions.
476 // I.e., preparse data isn't relevant when the lazy flag is off, and 476 // I.e., preparse data isn't relevant when the lazy flag is off, and
477 // for small sources, odds are that there aren't many functions 477 // for small sources, odds are that there aren't many functions
478 // that would be compiled lazily anyway, so we skip the preparse step 478 // that would be compiled lazily anyway, so we skip the preparse step
479 // in that case too. 479 // in that case too.
480 ScriptDataImpl* pre_data = input_pre_data; 480 ScriptDataImpl* pre_data = input_pre_data;
481 bool harmony_block_scoping = natives != NATIVES_CODE &&
482 FLAG_harmony_block_scoping;
481 if (pre_data == NULL 483 if (pre_data == NULL
482 && source_length >= FLAG_min_preparse_length) { 484 && source_length >= FLAG_min_preparse_length) {
483 if (source->IsExternalTwoByteString()) { 485 if (source->IsExternalTwoByteString()) {
484 ExternalTwoByteStringUC16CharacterStream stream( 486 ExternalTwoByteStringUC16CharacterStream stream(
485 Handle<ExternalTwoByteString>::cast(source), 0, source->length()); 487 Handle<ExternalTwoByteString>::cast(source), 0, source->length());
486 pre_data = ParserApi::PartialPreParse(&stream, extension); 488 pre_data = ParserApi::PartialPreParse(&stream,
489 extension,
490 harmony_block_scoping);
487 } else { 491 } else {
488 GenericStringUC16CharacterStream stream(source, 0, source->length()); 492 GenericStringUC16CharacterStream stream(source, 0, source->length());
489 pre_data = ParserApi::PartialPreParse(&stream, extension); 493 pre_data = ParserApi::PartialPreParse(&stream,
494 extension,
495 harmony_block_scoping);
490 } 496 }
491 } 497 }
492 498
493 // Create a script object describing the script to be compiled. 499 // Create a script object describing the script to be compiled.
494 Handle<Script> script = FACTORY->NewScript(source); 500 Handle<Script> script = FACTORY->NewScript(source);
495 if (natives == NATIVES_CODE) { 501 if (natives == NATIVES_CODE) {
496 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); 502 script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
497 } 503 }
498 if (!script_name.is_null()) { 504 if (!script_name.is_null()) {
499 script->set_name(*script_name); 505 script->set_name(*script_name);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 FunctionLiteral* lit, 735 FunctionLiteral* lit,
730 bool is_toplevel, 736 bool is_toplevel,
731 Handle<Script> script) { 737 Handle<Script> script) {
732 function_info->set_length(lit->num_parameters()); 738 function_info->set_length(lit->num_parameters());
733 function_info->set_formal_parameter_count(lit->num_parameters()); 739 function_info->set_formal_parameter_count(lit->num_parameters());
734 function_info->set_script(*script); 740 function_info->set_script(*script);
735 function_info->set_function_token_position(lit->function_token_position()); 741 function_info->set_function_token_position(lit->function_token_position());
736 function_info->set_start_position(lit->start_position()); 742 function_info->set_start_position(lit->start_position());
737 function_info->set_end_position(lit->end_position()); 743 function_info->set_end_position(lit->end_position());
738 function_info->set_is_expression(lit->is_expression()); 744 function_info->set_is_expression(lit->is_expression());
739 function_info->set_is_anonymous(lit->name()->length() == 0); 745 function_info->set_is_anonymous(lit->is_anonymous());
740 function_info->set_is_toplevel(is_toplevel); 746 function_info->set_is_toplevel(is_toplevel);
741 function_info->set_inferred_name(*lit->inferred_name()); 747 function_info->set_inferred_name(*lit->inferred_name());
742 function_info->SetThisPropertyAssignmentsInfo( 748 function_info->SetThisPropertyAssignmentsInfo(
743 lit->has_only_simple_this_property_assignments(), 749 lit->has_only_simple_this_property_assignments(),
744 *lit->this_property_assignments()); 750 *lit->this_property_assignments());
745 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); 751 function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
746 function_info->set_strict_mode(lit->strict_mode()); 752 function_info->set_strict_mode(lit->strict_mode());
747 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); 753 function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
748 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); 754 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
749 } 755 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 } 788 }
783 } 789 }
784 790
785 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 791 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
786 Handle<Script>(info->script()), 792 Handle<Script>(info->script()),
787 Handle<Code>(info->code()), 793 Handle<Code>(info->code()),
788 info)); 794 info));
789 } 795 }
790 796
791 } } // namespace v8::internal 797 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698