OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 script->set_column_offset(Smi::FromInt(0)); | 841 script->set_column_offset(Smi::FromInt(0)); |
842 script->set_context_data(heap->undefined_value()); | 842 script->set_context_data(heap->undefined_value()); |
843 script->set_type(Smi::FromInt(Script::TYPE_NORMAL)); | 843 script->set_type(Smi::FromInt(Script::TYPE_NORMAL)); |
844 script->set_wrapper(heap->undefined_value()); | 844 script->set_wrapper(heap->undefined_value()); |
845 script->set_line_ends(heap->undefined_value()); | 845 script->set_line_ends(heap->undefined_value()); |
846 script->set_eval_from_shared(heap->undefined_value()); | 846 script->set_eval_from_shared(heap->undefined_value()); |
847 script->set_eval_from_instructions_offset(Smi::FromInt(0)); | 847 script->set_eval_from_instructions_offset(Smi::FromInt(0)); |
848 script->set_shared_function_infos(Smi::FromInt(0)); | 848 script->set_shared_function_infos(Smi::FromInt(0)); |
849 script->set_flags(Smi::FromInt(0)); | 849 script->set_flags(Smi::FromInt(0)); |
850 | 850 |
| 851 heap->set_script_list(*WeakFixedArray::Add(script_list(), script)); |
851 return script; | 852 return script; |
852 } | 853 } |
853 | 854 |
854 | 855 |
855 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { | 856 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { |
856 CALL_HEAP_FUNCTION(isolate(), | 857 CALL_HEAP_FUNCTION(isolate(), |
857 isolate()->heap()->AllocateForeign(addr, pretenure), | 858 isolate()->heap()->AllocateForeign(addr, pretenure), |
858 Foreign); | 859 Foreign); |
859 } | 860 } |
860 | 861 |
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2317 } | 2318 } |
2318 | 2319 |
2319 | 2320 |
2320 Handle<Object> Factory::ToBoolean(bool value) { | 2321 Handle<Object> Factory::ToBoolean(bool value) { |
2321 return value ? true_value() : false_value(); | 2322 return value ? true_value() : false_value(); |
2322 } | 2323 } |
2323 | 2324 |
2324 | 2325 |
2325 } // namespace internal | 2326 } // namespace internal |
2326 } // namespace v8 | 2327 } // namespace v8 |
OLD | NEW |