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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 } | 916 } |
917 | 917 |
918 | 918 |
919 Handle<Struct> Factory::NewStruct(InstanceType type) { | 919 Handle<Struct> Factory::NewStruct(InstanceType type) { |
920 CALL_HEAP_FUNCTION( | 920 CALL_HEAP_FUNCTION( |
921 isolate(), | 921 isolate(), |
922 isolate()->heap()->AllocateStruct(type), | 922 isolate()->heap()->AllocateStruct(type), |
923 Struct); | 923 Struct); |
924 } | 924 } |
925 | 925 |
926 Handle<PromiseContainer> Factory::NewPromiseContainer( | 926 Handle<PromiseResolveThenableJobInfo> Factory::NewPromiseResolveThenableJobInfo( |
927 Handle<JSReceiver> thenable, Handle<JSReceiver> then, | 927 Handle<JSReceiver> thenable, Handle<JSReceiver> then, |
928 Handle<JSFunction> resolve, Handle<JSFunction> reject, | 928 Handle<JSFunction> resolve, Handle<JSFunction> reject, |
929 Handle<Object> before_debug_event, Handle<Object> after_debug_event) { | 929 Handle<Object> before_debug_event, Handle<Object> after_debug_event) { |
930 Handle<PromiseContainer> result = | 930 Handle<PromiseResolveThenableJobInfo> result = |
931 Handle<PromiseContainer>::cast(NewStruct(PROMISE_CONTAINER_TYPE)); | 931 Handle<PromiseResolveThenableJobInfo>::cast( |
| 932 NewStruct(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE)); |
932 result->set_thenable(*thenable); | 933 result->set_thenable(*thenable); |
933 result->set_then(*then); | 934 result->set_then(*then); |
934 result->set_resolve(*resolve); | 935 result->set_resolve(*resolve); |
935 result->set_reject(*reject); | 936 result->set_reject(*reject); |
936 result->set_before_debug_event(*before_debug_event); | 937 result->set_before_debug_event(*before_debug_event); |
937 result->set_after_debug_event(*after_debug_event); | 938 result->set_after_debug_event(*after_debug_event); |
938 return result; | 939 return result; |
939 } | 940 } |
940 | 941 |
941 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( | 942 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( |
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2619 Handle<AccessorInfo> prototype = | 2620 Handle<AccessorInfo> prototype = |
2620 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2621 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
2621 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2622 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
2622 prototype, attribs); | 2623 prototype, attribs); |
2623 map->AppendDescriptor(&d); | 2624 map->AppendDescriptor(&d); |
2624 } | 2625 } |
2625 } | 2626 } |
2626 | 2627 |
2627 } // namespace internal | 2628 } // namespace internal |
2628 } // namespace v8 | 2629 } // namespace v8 |
OLD | NEW |