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

Side by Side Diff: src/factory.cc

Issue 2277253003: [modules] Partial scope info support of modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@modules-refactor
Patch Set: This is so much fun. 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/factory.h ('k') | src/heap/heap.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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 } 1386 }
1387 1387
1388 1388
1389 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { 1389 Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
1390 Handle<FixedArray> array = NewFixedArray(length, TENURED); 1390 Handle<FixedArray> array = NewFixedArray(length, TENURED);
1391 array->set_map_no_write_barrier(*scope_info_map()); 1391 array->set_map_no_write_barrier(*scope_info_map());
1392 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array); 1392 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array);
1393 return scope_info; 1393 return scope_info;
1394 } 1394 }
1395 1395
1396 Handle<ModuleInfo> Factory::NewModuleInfo() {
1397 Handle<FixedArray> array = NewFixedArray(ModuleInfo::kLength, TENURED);
1398 array->set_map_no_write_barrier(*module_info_map());
1399 Handle<ModuleInfo> module_info = Handle<ModuleInfo>::cast(array);
1400 return module_info;
1401 }
1396 1402
1397 Handle<JSObject> Factory::NewExternal(void* value) { 1403 Handle<JSObject> Factory::NewExternal(void* value) {
1398 Handle<Foreign> foreign = NewForeign(static_cast<Address>(value)); 1404 Handle<Foreign> foreign = NewForeign(static_cast<Address>(value));
1399 Handle<JSObject> external = NewJSObjectFromMap(external_map()); 1405 Handle<JSObject> external = NewJSObjectFromMap(external_map());
1400 external->SetInternalField(0, *foreign); 1406 external->SetInternalField(0, *foreign);
1401 return external; 1407 return external;
1402 } 1408 }
1403 1409
1404 1410
1405 Handle<Code> Factory::NewCodeRaw(int object_size, bool immovable) { 1411 Handle<Code> Factory::NewCodeRaw(int object_size, bool immovable) {
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 Handle<AccessorInfo> prototype = 2511 Handle<AccessorInfo> prototype =
2506 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2512 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2507 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2513 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2508 prototype, attribs); 2514 prototype, attribs);
2509 map->AppendDescriptor(&d); 2515 map->AppendDescriptor(&d);
2510 } 2516 }
2511 } 2517 }
2512 2518
2513 } // namespace internal 2519 } // namespace internal
2514 } // namespace v8 2520 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698