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

Side by Side Diff: src/compiler.cc

Issue 2657413002: No need to collect literal counts.
Patch Set: Rebase. Created 3 years, 10 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 | « src/ast/ast.h ('k') | src/debug/liveedit.h » ('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 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 v8::Utils::ToLocal(name)); 1842 v8::Utils::ToLocal(name));
1843 DCHECK(!fun_template.IsEmpty()); 1843 DCHECK(!fun_template.IsEmpty());
1844 1844
1845 // Instantiate the function and create a shared function info from it. 1845 // Instantiate the function and create a shared function info from it.
1846 Handle<JSFunction> fun = Handle<JSFunction>::cast(Utils::OpenHandle( 1846 Handle<JSFunction> fun = Handle<JSFunction>::cast(Utils::OpenHandle(
1847 *fun_template->GetFunction(v8_isolate->GetCurrentContext()) 1847 *fun_template->GetFunction(v8_isolate->GetCurrentContext())
1848 .ToLocalChecked())); 1848 .ToLocalChecked()));
1849 Handle<Code> code = Handle<Code>(fun->shared()->code()); 1849 Handle<Code> code = Handle<Code>(fun->shared()->code());
1850 Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub()); 1850 Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub());
1851 Handle<SharedFunctionInfo> shared = isolate->factory()->NewSharedFunctionInfo( 1851 Handle<SharedFunctionInfo> shared = isolate->factory()->NewSharedFunctionInfo(
1852 name, fun->shared()->num_literals(), FunctionKind::kNormalFunction, code, 1852 name, FunctionKind::kNormalFunction, code,
1853 Handle<ScopeInfo>(fun->shared()->scope_info())); 1853 Handle<ScopeInfo>(fun->shared()->scope_info()));
1854 shared->set_outer_scope_info(fun->shared()->outer_scope_info()); 1854 shared->set_outer_scope_info(fun->shared()->outer_scope_info());
1855 shared->SetConstructStub(*construct_stub); 1855 shared->SetConstructStub(*construct_stub);
1856 shared->set_feedback_metadata(fun->shared()->feedback_metadata()); 1856 shared->set_feedback_metadata(fun->shared()->feedback_metadata());
1857 1857
1858 // Copy the function data to the shared function info. 1858 // Copy the function data to the shared function info.
1859 shared->set_function_data(fun->shared()->function_data()); 1859 shared->set_function_data(fun->shared()->function_data());
1860 int parameters = fun->shared()->internal_formal_parameter_count(); 1860 int parameters = fun->shared()->internal_formal_parameter_count();
1861 shared->set_internal_formal_parameter_count(parameters); 1861 shared->set_internal_formal_parameter_count(parameters);
1862 1862
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 } 1915 }
1916 1916
1917 if (shared->is_compiled()) { 1917 if (shared->is_compiled()) {
1918 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1918 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1919 JSFunction::EnsureLiterals(function); 1919 JSFunction::EnsureLiterals(function);
1920 } 1920 }
1921 } 1921 }
1922 1922
1923 } // namespace internal 1923 } // namespace internal
1924 } // namespace v8 1924 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/debug/liveedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698