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

Side by Side Diff: src/compiler.cc

Issue 1782013002: [compiler] Sidestep the interpreter for generator functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 9 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
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return true; 777 return true;
778 } 778 }
779 779
780 780
781 static bool UseIgnition(CompilationInfo* info) { 781 static bool UseIgnition(CompilationInfo* info) {
782 // Cannot use Ignition when the {function_data} is already used. 782 // Cannot use Ignition when the {function_data} is already used.
783 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) { 783 if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId()) {
784 return false; 784 return false;
785 } 785 }
786 786
787 // TODO(4681): Generators are not yet supported.
788 if (info->has_shared_info() && info->shared_info()->is_generator()) {
789 return false;
790 }
791
787 // Checks whether top level functions should be passed by the filter. 792 // Checks whether top level functions should be passed by the filter.
788 if (info->closure().is_null()) { 793 if (info->closure().is_null()) {
789 Vector<const char> filter = CStrVector(FLAG_ignition_filter); 794 Vector<const char> filter = CStrVector(FLAG_ignition_filter);
790 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); 795 return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*');
791 } 796 }
792 797
793 // Finally respect the filter. 798 // Finally respect the filter.
794 return info->closure()->PassesFilter(FLAG_ignition_filter); 799 return info->closure()->PassesFilter(FLAG_ignition_filter);
795 } 800 }
796 801
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 1957
1953 #if DEBUG 1958 #if DEBUG
1954 void CompilationInfo::PrintAstForTesting() { 1959 void CompilationInfo::PrintAstForTesting() {
1955 PrintF("--- Source from AST ---\n%s\n", 1960 PrintF("--- Source from AST ---\n%s\n",
1956 PrettyPrinter(isolate()).PrintProgram(literal())); 1961 PrettyPrinter(isolate()).PrintProgram(literal()));
1957 } 1962 }
1958 #endif 1963 #endif
1959 1964
1960 } // namespace internal 1965 } // namespace internal
1961 } // namespace v8 1966 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698