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/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 : empty_fixed_array(); | 1922 : empty_fixed_array(); |
1923 | 1923 |
1924 Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE)); | 1924 Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE)); |
1925 module->set_code(*code); | 1925 module->set_code(*code); |
1926 module->set_exports(*exports); | 1926 module->set_exports(*exports); |
1927 module->set_regular_exports(*regular_exports); | 1927 module->set_regular_exports(*regular_exports); |
1928 module->set_regular_imports(*regular_imports); | 1928 module->set_regular_imports(*regular_imports); |
1929 module->set_hash(isolate()->GenerateIdentityHash(Smi::kMaxValue)); | 1929 module->set_hash(isolate()->GenerateIdentityHash(Smi::kMaxValue)); |
1930 module->set_module_namespace(isolate()->heap()->undefined_value()); | 1930 module->set_module_namespace(isolate()->heap()->undefined_value()); |
1931 module->set_requested_modules(*requested_modules); | 1931 module->set_requested_modules(*requested_modules); |
| 1932 module->set_script(Script::cast(code->script())); |
1932 DCHECK(!module->instantiated()); | 1933 DCHECK(!module->instantiated()); |
1933 DCHECK(!module->evaluated()); | 1934 DCHECK(!module->evaluated()); |
1934 return module; | 1935 return module; |
1935 } | 1936 } |
1936 | 1937 |
1937 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared, | 1938 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared, |
1938 PretenureFlag pretenure) { | 1939 PretenureFlag pretenure) { |
1939 Handle<JSFunction> array_buffer_fun( | 1940 Handle<JSFunction> array_buffer_fun( |
1940 shared == SharedFlag::kShared | 1941 shared == SharedFlag::kShared |
1941 ? isolate()->native_context()->shared_array_buffer_fun() | 1942 ? isolate()->native_context()->shared_array_buffer_fun() |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2849 Handle<AccessorInfo> prototype = | 2850 Handle<AccessorInfo> prototype = |
2850 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2851 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
2851 Descriptor d = Descriptor::AccessorConstant( | 2852 Descriptor d = Descriptor::AccessorConstant( |
2852 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2853 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
2853 map->AppendDescriptor(&d); | 2854 map->AppendDescriptor(&d); |
2854 } | 2855 } |
2855 } | 2856 } |
2856 | 2857 |
2857 } // namespace internal | 2858 } // namespace internal |
2858 } // namespace v8 | 2859 } // namespace v8 |
OLD | NEW |