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

Side by Side Diff: src/compiler.cc

Issue 1528853002: [interpreter] Use interpreter on all function literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: One more skip. 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 | « no previous file | test/mjsunit/mjsunit.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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 info.SetCode(code); 1570 info.SetCode(code);
1571 // There's no need in theory for a lazy-compiled function to have a type 1571 // There's no need in theory for a lazy-compiled function to have a type
1572 // feedback vector, but some parts of the system expect all 1572 // feedback vector, but some parts of the system expect all
1573 // SharedFunctionInfo instances to have one. The size of the vector depends 1573 // SharedFunctionInfo instances to have one. The size of the vector depends
1574 // on how many feedback-needing nodes are in the tree, and when lazily 1574 // on how many feedback-needing nodes are in the tree, and when lazily
1575 // parsing we might not know that, if this function was never parsed before. 1575 // parsing we might not know that, if this function was never parsed before.
1576 // In that case the vector will be replaced the next time MakeCode is 1576 // In that case the vector will be replaced the next time MakeCode is
1577 // called. 1577 // called.
1578 info.EnsureFeedbackVector(); 1578 info.EnsureFeedbackVector();
1579 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate)); 1579 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate));
1580 } else if (Renumber(info.parse_info()) && 1580 } else if (Renumber(info.parse_info()) && GenerateBaselineCode(&info)) {
1581 FullCodeGenerator::MakeCode(&info)) {
1582 // Code generation will ensure that the feedback vector is present and 1581 // Code generation will ensure that the feedback vector is present and
1583 // appropriately sized. 1582 // appropriately sized.
1584 DCHECK(!info.code().is_null()); 1583 DCHECK(!info.code().is_null());
1585 scope_info = ScopeInfo::Create(info.isolate(), info.zone(), info.scope()); 1584 scope_info = ScopeInfo::Create(info.isolate(), info.zone(), info.scope());
1586 if (literal->should_eager_compile() && 1585 if (literal->should_eager_compile() &&
1587 literal->should_be_used_once_hint()) { 1586 literal->should_be_used_once_hint()) {
1588 info.code()->MarkToBeExecutedOnce(isolate); 1587 info.code()->MarkToBeExecutedOnce(isolate);
1589 } 1588 }
1590 } else { 1589 } else {
1591 return Handle<SharedFunctionInfo>::null(); 1590 return Handle<SharedFunctionInfo>::null();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 } 1784 }
1786 1785
1787 #if DEBUG 1786 #if DEBUG
1788 void CompilationInfo::PrintAstForTesting() { 1787 void CompilationInfo::PrintAstForTesting() {
1789 PrintF("--- Source from AST ---\n%s\n", 1788 PrintF("--- Source from AST ---\n%s\n",
1790 PrettyPrinter(isolate()).PrintProgram(literal())); 1789 PrettyPrinter(isolate()).PrintProgram(literal()));
1791 } 1790 }
1792 #endif 1791 #endif
1793 } // namespace internal 1792 } // namespace internal
1794 } // namespace v8 1793 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698