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

Side by Side Diff: src/compiler.cc

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years 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 | « src/builtins.h ('k') | src/compiler/js-call-reducer.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 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 739
740 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon( 740 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
741 CompilationInfo* info) { 741 CompilationInfo* info) {
742 VMState<COMPILER> state(info->isolate()); 742 VMState<COMPILER> state(info->isolate());
743 PostponeInterruptsScope postpone(info->isolate()); 743 PostponeInterruptsScope postpone(info->isolate());
744 744
745 // Parse and update CompilationInfo with the results. 745 // Parse and update CompilationInfo with the results.
746 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>(); 746 if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>();
747 Handle<SharedFunctionInfo> shared = info->shared_info(); 747 Handle<SharedFunctionInfo> shared = info->shared_info();
748 FunctionLiteral* lit = info->literal(); 748 FunctionLiteral* lit = info->literal();
749 shared->set_language_mode(lit->language_mode()); 749 DCHECK_EQ(shared->language_mode(), lit->language_mode());
750 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 750 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
751 MaybeDisableOptimization(shared, lit->dont_optimize_reason()); 751 MaybeDisableOptimization(shared, lit->dont_optimize_reason());
752 752
753 if (FLAG_ignition && !shared->HasBuiltinFunctionId() && 753 if (FLAG_ignition && !shared->HasBuiltinFunctionId() &&
754 info->closure()->PassesFilter(FLAG_ignition_filter)) { 754 info->closure()->PassesFilter(FLAG_ignition_filter)) {
755 // Compile bytecode for the interpreter. 755 // Compile bytecode for the interpreter.
756 if (!GenerateBytecode(info)) return MaybeHandle<Code>(); 756 if (!GenerateBytecode(info)) return MaybeHandle<Code>();
757 } else { 757 } else {
758 // Compile unoptimized code. 758 // Compile unoptimized code.
759 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>(); 759 if (!CompileUnoptimizedCode(info)) return MaybeHandle<Code>();
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 } 1802 }
1803 1803
1804 #if DEBUG 1804 #if DEBUG
1805 void CompilationInfo::PrintAstForTesting() { 1805 void CompilationInfo::PrintAstForTesting() {
1806 PrintF("--- Source from AST ---\n%s\n", 1806 PrintF("--- Source from AST ---\n%s\n",
1807 PrettyPrinter(isolate()).PrintProgram(literal())); 1807 PrettyPrinter(isolate()).PrintProgram(literal()));
1808 } 1808 }
1809 #endif 1809 #endif
1810 } // namespace internal 1810 } // namespace internal
1811 } // namespace v8 1811 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698