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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 } | 1041 } |
1042 | 1042 |
1043 Handle<Struct> Factory::NewStruct(InstanceType type) { | 1043 Handle<Struct> Factory::NewStruct(InstanceType type) { |
1044 CALL_HEAP_FUNCTION( | 1044 CALL_HEAP_FUNCTION( |
1045 isolate(), | 1045 isolate(), |
1046 isolate()->heap()->AllocateStruct(type), | 1046 isolate()->heap()->AllocateStruct(type), |
1047 Struct); | 1047 Struct); |
1048 } | 1048 } |
1049 | 1049 |
1050 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( | 1050 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( |
1051 Handle<JSPromise> promise, Handle<Object> value, Handle<Object> tasks, | 1051 Handle<Object> value, Handle<Object> tasks, Handle<Object> deferred_promise, |
1052 Handle<Object> deferred_promise, Handle<Object> deferred_on_resolve, | 1052 Handle<Object> deferred_on_resolve, Handle<Object> deferred_on_reject, |
1053 Handle<Object> deferred_on_reject, Handle<Context> context) { | 1053 Handle<Context> context) { |
1054 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast( | 1054 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast( |
1055 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE)); | 1055 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE)); |
1056 result->set_promise(*promise); | |
1057 result->set_value(*value); | 1056 result->set_value(*value); |
1058 result->set_tasks(*tasks); | 1057 result->set_tasks(*tasks); |
1059 result->set_deferred_promise(*deferred_promise); | 1058 result->set_deferred_promise(*deferred_promise); |
1060 result->set_deferred_on_resolve(*deferred_on_resolve); | 1059 result->set_deferred_on_resolve(*deferred_on_resolve); |
1061 result->set_deferred_on_reject(*deferred_on_reject); | 1060 result->set_deferred_on_reject(*deferred_on_reject); |
1062 result->set_debug_id(kDebugPromiseFirstID); | 1061 result->set_debug_id(kDebugPromiseFirstID); |
1063 result->set_debug_name(kDebugNotActive); | 1062 result->set_debug_name(kDebugNotActive); |
1064 result->set_context(*context); | 1063 result->set_context(*context); |
1065 return result; | 1064 return result; |
1066 } | 1065 } |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 Handle<AccessorInfo> prototype = | 2831 Handle<AccessorInfo> prototype = |
2833 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2832 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
2834 Descriptor d = Descriptor::AccessorConstant( | 2833 Descriptor d = Descriptor::AccessorConstant( |
2835 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2834 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
2836 map->AppendDescriptor(&d); | 2835 map->AppendDescriptor(&d); |
2837 } | 2836 } |
2838 } | 2837 } |
2839 | 2838 |
2840 } // namespace internal | 2839 } // namespace internal |
2841 } // namespace v8 | 2840 } // namespace v8 |
OLD | NEW |