| 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 Handle<Struct> Factory::NewStruct(InstanceType type) { | 918 Handle<Struct> Factory::NewStruct(InstanceType type) { |
| 919 CALL_HEAP_FUNCTION( | 919 CALL_HEAP_FUNCTION( |
| 920 isolate(), | 920 isolate(), |
| 921 isolate()->heap()->AllocateStruct(type), | 921 isolate()->heap()->AllocateStruct(type), |
| 922 Struct); | 922 Struct); |
| 923 } | 923 } |
| 924 | 924 |
| 925 Handle<PromiseContainer> Factory::NewPromiseContainer( | 925 Handle<PromiseContainer> Factory::NewPromiseContainer( |
| 926 Handle<JSReceiver> thenable, Handle<JSFunction> then, | 926 Handle<JSReceiver> thenable, Handle<JSReceiver> then, |
| 927 Handle<JSFunction> resolve, Handle<JSFunction> reject, | 927 Handle<JSFunction> resolve, Handle<JSFunction> reject, |
| 928 Handle<Object> before_debug_event, Handle<Object> after_debug_event) { | 928 Handle<Object> before_debug_event, Handle<Object> after_debug_event) { |
| 929 Handle<PromiseContainer> result = | 929 Handle<PromiseContainer> result = |
| 930 Handle<PromiseContainer>::cast(NewStruct(PROMISE_CONTAINER_TYPE)); | 930 Handle<PromiseContainer>::cast(NewStruct(PROMISE_CONTAINER_TYPE)); |
| 931 result->set_thenable(*thenable); | 931 result->set_thenable(*thenable); |
| 932 result->set_then(*then); | 932 result->set_then(*then); |
| 933 result->set_resolve(*resolve); | 933 result->set_resolve(*resolve); |
| 934 result->set_reject(*reject); | 934 result->set_reject(*reject); |
| 935 result->set_before_debug_event(*before_debug_event); | 935 result->set_before_debug_event(*before_debug_event); |
| 936 result->set_after_debug_event(*after_debug_event); | 936 result->set_after_debug_event(*after_debug_event); |
| (...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2598 Handle<AccessorInfo> prototype = | 2598 Handle<AccessorInfo> prototype = |
| 2599 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2599 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
| 2600 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2600 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
| 2601 prototype, attribs); | 2601 prototype, attribs); |
| 2602 map->AppendDescriptor(&d); | 2602 map->AppendDescriptor(&d); |
| 2603 } | 2603 } |
| 2604 } | 2604 } |
| 2605 | 2605 |
| 2606 } // namespace internal | 2606 } // namespace internal |
| 2607 } // namespace v8 | 2607 } // namespace v8 |
| OLD | NEW |