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

Side by Side Diff: src/compiler.cc

Issue 2505853003: Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: rebase Created 4 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 | « src/ast/prettyprinter.cc ('k') | src/compiler/js-inlining-heuristic.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 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 if (!maybe_result.ToHandle(&result) || 1440 if (!maybe_result.ToHandle(&result) ||
1441 (FLAG_serialize_toplevel && 1441 (FLAG_serialize_toplevel &&
1442 compile_options == ScriptCompiler::kProduceCodeCache)) { 1442 compile_options == ScriptCompiler::kProduceCodeCache)) {
1443 // No cache entry found, or embedder wants a code cache. Compile the script. 1443 // No cache entry found, or embedder wants a code cache. Compile the script.
1444 1444
1445 // Create a script object describing the script to be compiled. 1445 // Create a script object describing the script to be compiled.
1446 Handle<Script> script = isolate->factory()->NewScript(source); 1446 Handle<Script> script = isolate->factory()->NewScript(source);
1447 if (FLAG_trace_deopt) Script::InitLineEnds(script); 1447 if (FLAG_trace_deopt) Script::InitLineEnds(script);
1448 if (natives == NATIVES_CODE) { 1448 if (natives == NATIVES_CODE) {
1449 script->set_type(Script::TYPE_NATIVE); 1449 script->set_type(Script::TYPE_NATIVE);
1450 script->set_hide_source(true);
1451 } else if (natives == EXTENSION_CODE) { 1450 } else if (natives == EXTENSION_CODE) {
1452 script->set_type(Script::TYPE_EXTENSION); 1451 script->set_type(Script::TYPE_EXTENSION);
1453 script->set_hide_source(true);
1454 } else if (natives == INSPECTOR_CODE) { 1452 } else if (natives == INSPECTOR_CODE) {
1455 script->set_type(Script::TYPE_INSPECTOR); 1453 script->set_type(Script::TYPE_INSPECTOR);
1456 script->set_hide_source(true);
1457 } 1454 }
1458 if (!script_name.is_null()) { 1455 if (!script_name.is_null()) {
1459 script->set_name(*script_name); 1456 script->set_name(*script_name);
1460 script->set_line_offset(line_offset); 1457 script->set_line_offset(line_offset);
1461 script->set_column_offset(column_offset); 1458 script->set_column_offset(column_offset);
1462 } 1459 }
1463 script->set_origin_options(resource_options); 1460 script->set_origin_options(resource_options);
1464 if (!source_map_url.is_null()) { 1461 if (!source_map_url.is_null()) {
1465 script->set_source_mapping_url(*source_map_url); 1462 script->set_source_mapping_url(*source_map_url);
1466 } 1463 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 DCHECK(shared->is_compiled()); 1721 DCHECK(shared->is_compiled());
1725 function->set_literals(cached.literals); 1722 function->set_literals(cached.literals);
1726 } else if (shared->is_compiled()) { 1723 } else if (shared->is_compiled()) {
1727 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1724 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1728 JSFunction::EnsureLiterals(function); 1725 JSFunction::EnsureLiterals(function);
1729 } 1726 }
1730 } 1727 }
1731 1728
1732 } // namespace internal 1729 } // namespace internal
1733 } // namespace v8 1730 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698