| 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 Handle<Map> map = shared_function_info_map(); | 2208 Handle<Map> map = shared_function_info_map(); |
| 2209 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); | 2209 Handle<SharedFunctionInfo> share = New<SharedFunctionInfo>(map, OLD_SPACE); |
| 2210 | 2210 |
| 2211 // Set pointer fields. | 2211 // Set pointer fields. |
| 2212 share->set_name(*name); | 2212 share->set_name(*name); |
| 2213 Handle<Code> code; | 2213 Handle<Code> code; |
| 2214 if (!maybe_code.ToHandle(&code)) { | 2214 if (!maybe_code.ToHandle(&code)) { |
| 2215 code = isolate()->builtins()->Illegal(); | 2215 code = isolate()->builtins()->Illegal(); |
| 2216 } | 2216 } |
| 2217 share->set_code(*code); | 2217 share->set_code(*code); |
| 2218 share->set_optimized_code_map(*cleared_optimized_code_map()); | 2218 share->set_optimized_code_map(*empty_fixed_array()); |
| 2219 share->set_scope_info(ScopeInfo::Empty(isolate())); | 2219 share->set_scope_info(ScopeInfo::Empty(isolate())); |
| 2220 share->set_outer_scope_info(*the_hole_value()); | 2220 share->set_outer_scope_info(*the_hole_value()); |
| 2221 Handle<Code> construct_stub = | 2221 Handle<Code> construct_stub = |
| 2222 is_constructor ? isolate()->builtins()->JSConstructStubGeneric() | 2222 is_constructor ? isolate()->builtins()->JSConstructStubGeneric() |
| 2223 : isolate()->builtins()->ConstructedNonConstructable(); | 2223 : isolate()->builtins()->ConstructedNonConstructable(); |
| 2224 share->SetConstructStub(*construct_stub); | 2224 share->SetConstructStub(*construct_stub); |
| 2225 share->set_instance_class_name(*Object_string()); | 2225 share->set_instance_class_name(*Object_string()); |
| 2226 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); | 2226 share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER); |
| 2227 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); | 2227 share->set_script(*undefined_value(), SKIP_WRITE_BARRIER); |
| 2228 share->set_debug_info(DebugInfo::uninitialized(), SKIP_WRITE_BARRIER); | 2228 share->set_debug_info(DebugInfo::uninitialized(), SKIP_WRITE_BARRIER); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 Handle<AccessorInfo> prototype = | 2603 Handle<AccessorInfo> prototype = |
| 2604 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2604 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
| 2605 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2605 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
| 2606 prototype, attribs); | 2606 prototype, attribs); |
| 2607 map->AppendDescriptor(&d); | 2607 map->AppendDescriptor(&d); |
| 2608 } | 2608 } |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 } // namespace internal | 2611 } // namespace internal |
| 2612 } // namespace v8 | 2612 } // namespace v8 |
| OLD | NEW |