Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/factory.cc

Issue 2351113004: [modules] Expand API to allow linking and use it in d8 (Closed)
Patch Set: Use StrictEquals, remove check for bad instantiation behavior Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/d8.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 ObjectHashTable::New(isolate(), module_info->regular_exports()->length()); 1719 ObjectHashTable::New(isolate(), module_info->regular_exports()->length());
1720 int requested_modules_length = module_info->module_requests()->length(); 1720 int requested_modules_length = module_info->module_requests()->length();
1721 Handle<FixedArray> requested_modules = 1721 Handle<FixedArray> requested_modules =
1722 requested_modules_length > 0 ? NewFixedArray(requested_modules_length) 1722 requested_modules_length > 0 ? NewFixedArray(requested_modules_length)
1723 : empty_fixed_array(); 1723 : empty_fixed_array();
1724 1724
1725 Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE)); 1725 Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE));
1726 module->set_code(*code); 1726 module->set_code(*code);
1727 module->set_exports(*exports); 1727 module->set_exports(*exports);
1728 module->set_requested_modules(*requested_modules); 1728 module->set_requested_modules(*requested_modules);
1729 module->set_flags(0);
1729 return module; 1730 return module;
1730 } 1731 }
1731 1732
1732 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared, 1733 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared,
1733 PretenureFlag pretenure) { 1734 PretenureFlag pretenure) {
1734 Handle<JSFunction> array_buffer_fun( 1735 Handle<JSFunction> array_buffer_fun(
1735 shared == SharedFlag::kShared 1736 shared == SharedFlag::kShared
1736 ? isolate()->native_context()->shared_array_buffer_fun() 1737 ? isolate()->native_context()->shared_array_buffer_fun()
1737 : isolate()->native_context()->array_buffer_fun()); 1738 : isolate()->native_context()->array_buffer_fun());
1738 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateJSObject( 1739 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateJSObject(
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 Handle<AccessorInfo> prototype = 2552 Handle<AccessorInfo> prototype =
2552 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2553 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2553 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2554 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2554 prototype, attribs); 2555 prototype, attribs);
2555 map->AppendDescriptor(&d); 2556 map->AppendDescriptor(&d);
2556 } 2557 }
2557 } 2558 }
2558 2559
2559 } // namespace internal 2560 } // namespace internal
2560 } // namespace v8 2561 } // namespace v8
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698