OLD | NEW |
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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 script->set_hide_source(true); |
1451 } else if (natives == EXTENSION_CODE) { | 1451 } else if (natives == EXTENSION_CODE) { |
1452 script->set_type(Script::TYPE_EXTENSION); | 1452 script->set_type(Script::TYPE_EXTENSION); |
1453 script->set_hide_source(true); | 1453 script->set_hide_source(true); |
| 1454 } else if (natives == INSPECTOR_CODE) { |
| 1455 script->set_type(Script::TYPE_INSPECTOR); |
| 1456 script->set_hide_source(true); |
1454 } | 1457 } |
1455 if (!script_name.is_null()) { | 1458 if (!script_name.is_null()) { |
1456 script->set_name(*script_name); | 1459 script->set_name(*script_name); |
1457 script->set_line_offset(line_offset); | 1460 script->set_line_offset(line_offset); |
1458 script->set_column_offset(column_offset); | 1461 script->set_column_offset(column_offset); |
1459 } | 1462 } |
1460 script->set_origin_options(resource_options); | 1463 script->set_origin_options(resource_options); |
1461 if (!source_map_url.is_null()) { | 1464 if (!source_map_url.is_null()) { |
1462 script->set_source_mapping_url(*source_map_url); | 1465 script->set_source_mapping_url(*source_map_url); |
1463 } | 1466 } |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 DCHECK(shared->is_compiled()); | 1724 DCHECK(shared->is_compiled()); |
1722 function->set_literals(cached.literals); | 1725 function->set_literals(cached.literals); |
1723 } else if (shared->is_compiled()) { | 1726 } else if (shared->is_compiled()) { |
1724 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1727 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1725 JSFunction::EnsureLiterals(function); | 1728 JSFunction::EnsureLiterals(function); |
1726 } | 1729 } |
1727 } | 1730 } |
1728 | 1731 |
1729 } // namespace internal | 1732 } // namespace internal |
1730 } // namespace v8 | 1733 } // namespace v8 |
OLD | NEW |