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 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 Handle<Map> map = shared_function_info_map(); | 2064 Handle<Map> map = shared_function_info_map(); |
2065 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); | 2065 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); |
2066 | 2066 |
2067 // Set pointer fields. | 2067 // Set pointer fields. |
2068 share->set_name(*name); | 2068 share->set_name(*name); |
2069 Handle<Code> code; | 2069 Handle<Code> code; |
2070 if (!maybe_code.ToHandle(&code)) { | 2070 if (!maybe_code.ToHandle(&code)) { |
2071 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal)); | 2071 code = handle(isolate()->builtins()->builtin(Builtins::kIllegal)); |
2072 } | 2072 } |
2073 share->set_code(*code); | 2073 share->set_code(*code); |
2074 share->set_optimized_code_map(Smi::FromInt(0)); | 2074 share->set_optimized_code_map(*cleared_optimized_code_map()); |
2075 share->set_scope_info(ScopeInfo::Empty(isolate())); | 2075 share->set_scope_info(ScopeInfo::Empty(isolate())); |
2076 Code* construct_stub = | 2076 Code* construct_stub = |
2077 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); | 2077 isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); |
2078 share->set_construct_stub(construct_stub); | 2078 share->set_construct_stub(construct_stub); |
2079 share->set_instance_class_name(*Object_string()); | 2079 share->set_instance_class_name(*Object_string()); |
2080 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); | 2080 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); |
2081 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); | 2081 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); |
2082 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER); | 2082 share->set_debug_info(*undefined_value(), SKIP_WRITE_BARRIER); |
2083 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER); | 2083 share->set_inferred_name(*empty_string(), SKIP_WRITE_BARRIER); |
2084 StaticFeedbackVectorSpec empty_spec; | 2084 StaticFeedbackVectorSpec empty_spec; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2334 } | 2334 } |
2335 | 2335 |
2336 | 2336 |
2337 Handle<Object> Factory::ToBoolean(bool value) { | 2337 Handle<Object> Factory::ToBoolean(bool value) { |
2338 return value ? true_value() : false_value(); | 2338 return value ? true_value() : false_value(); |
2339 } | 2339 } |
2340 | 2340 |
2341 | 2341 |
2342 } // namespace internal | 2342 } // namespace internal |
2343 } // namespace v8 | 2343 } // namespace v8 |
OLD | NEW |