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

Side by Side Diff: src/compiler.cc

Issue 1427143002: [Interpreter] Don't compile Api or Builtin id functions through the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove IsApiFunction() check. Created 5 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
« no previous file with comments | « no previous file | no next file » | 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-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 PostponeInterruptsScope postpone(info->isolate()); 740 PostponeInterruptsScope postpone(info->isolate());
741 741
742 // Parse and update CompilationInfo with the results. 742 // Parse and update CompilationInfo with the results.
743 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>(); 743 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>();
744 Handle<SharedFunctionInfo> shared = info->shared_info(); 744 Handle<SharedFunctionInfo> shared = info->shared_info();
745 FunctionLiteral* lit = info->literal(); 745 FunctionLiteral* lit = info->literal();
746 shared->set_language_mode(lit->language_mode()); 746 shared->set_language_mode(lit->language_mode());
747 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 747 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
748 MaybeDisableOptimization(shared, lit->dont_optimize_reason()); 748 MaybeDisableOptimization(shared, lit->dont_optimize_reason());
749 749
750 if (FLAG_ignition && info->closure()->PassesFilter(FLAG_ignition_filter) && 750 if (FLAG_ignition && !shared->HasBuiltinFunctionId() &&
751 info->closure()->PassesFilter(FLAG_ignition_filter) &&
751 ScriptPassesFilter(FLAG_ignition_script_filter, info->script())) { 752 ScriptPassesFilter(FLAG_ignition_script_filter, info->script())) {
752 // Compile bytecode for the interpreter. 753 // Compile bytecode for the interpreter.
753 if (!GenerateBytecode(info)) return MaybeHandle<Code>(); 754 if (!GenerateBytecode(info)) return MaybeHandle<Code>();
754 } else { 755 } else {
755 // Compile unoptimized code. 756 // Compile unoptimized code.
756 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>(); 757 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>();
757 758
758 CHECK_EQ(Code::FUNCTION, info->code()->kind()); 759 CHECK_EQ(Code::FUNCTION, info->code()->kind());
759 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); 760 RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
760 } 761 }
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 } 1794 }
1794 1795
1795 #if DEBUG 1796 #if DEBUG
1796 void CompilationInfo::PrintAstForTesting() { 1797 void CompilationInfo::PrintAstForTesting() {
1797 PrintF("--- Source from AST ---\n%s\n", 1798 PrintF("--- Source from AST ---\n%s\n",
1798 PrettyPrinter(isolate()).PrintProgram(literal())); 1799 PrettyPrinter(isolate()).PrintProgram(literal()));
1799 } 1800 }
1800 #endif 1801 #endif
1801 } // namespace internal 1802 } // namespace internal
1802 } // namespace v8 1803 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698