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

Side by Side Diff: src/compiler.cc

Issue 2512463002: Revert of Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: 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);
1450 } else if (natives == EXTENSION_CODE) { 1451 } else if (natives == EXTENSION_CODE) {
1451 script->set_type(Script::TYPE_EXTENSION); 1452 script->set_type(Script::TYPE_EXTENSION);
1453 script->set_hide_source(true);
1452 } 1454 }
1453 if (!script_name.is_null()) { 1455 if (!script_name.is_null()) {
1454 script->set_name(*script_name); 1456 script->set_name(*script_name);
1455 script->set_line_offset(line_offset); 1457 script->set_line_offset(line_offset);
1456 script->set_column_offset(column_offset); 1458 script->set_column_offset(column_offset);
1457 } 1459 }
1458 script->set_origin_options(resource_options); 1460 script->set_origin_options(resource_options);
1459 if (!source_map_url.is_null()) { 1461 if (!source_map_url.is_null()) {
1460 script->set_source_mapping_url(*source_map_url); 1462 script->set_source_mapping_url(*source_map_url);
1461 } 1463 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 DCHECK(shared->is_compiled()); 1721 DCHECK(shared->is_compiled());
1720 function->set_literals(cached.literals); 1722 function->set_literals(cached.literals);
1721 } else if (shared->is_compiled()) { 1723 } else if (shared->is_compiled()) {
1722 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1724 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1723 JSFunction::EnsureLiterals(function); 1725 JSFunction::EnsureLiterals(function);
1724 } 1726 }
1725 } 1727 }
1726 1728
1727 } // namespace internal 1729 } // namespace internal
1728 } // 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