OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 8216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8227 } | 8227 } |
8228 | 8228 |
8229 Node* CodeStubAssembler::IsDebugActive() { | 8229 Node* CodeStubAssembler::IsDebugActive() { |
8230 Node* is_debug_active = Load( | 8230 Node* is_debug_active = Load( |
8231 MachineType::Uint8(), | 8231 MachineType::Uint8(), |
8232 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8232 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
8233 return Word32NotEqual(is_debug_active, Int32Constant(0)); | 8233 return Word32NotEqual(is_debug_active, Int32Constant(0)); |
8234 } | 8234 } |
8235 | 8235 |
8236 Node* CodeStubAssembler::IsPromiseHookEnabled() { | 8236 Node* CodeStubAssembler::IsPromiseHookEnabled() { |
8237 Node* const is_promisehook_enabled = | 8237 Node* const is_promise_hook_enabled = |
8238 Load(MachineType::Uint8(), | 8238 Load(MachineType::Uint8(), |
8239 ExternalConstant( | 8239 ExternalConstant( |
8240 ExternalReference::is_promisehook_enabled_address(isolate()))); | 8240 ExternalReference::is_promise_hook_enabled_address(isolate()))); |
8241 return Word32NotEqual(is_promisehook_enabled, Int32Constant(0)); | 8241 return Word32NotEqual(is_promise_hook_enabled, Int32Constant(0)); |
8242 } | 8242 } |
8243 | 8243 |
8244 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { | 8244 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { |
8245 Node* const native_context = LoadNativeContext(context); | 8245 Node* const native_context = LoadNativeContext(context); |
8246 Node* const promise_fun = | 8246 Node* const promise_fun = |
8247 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); | 8247 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); |
8248 Node* const initial_map = | 8248 Node* const initial_map = |
8249 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); | 8249 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); |
8250 Node* const instance = AllocateJSObjectFromMap(initial_map); | 8250 Node* const instance = AllocateJSObjectFromMap(initial_map); |
8251 | 8251 |
(...skipping 29 matching lines...) Expand all Loading... |
8281 Heap::kUndefinedValueRootIndex); | 8281 Heap::kUndefinedValueRootIndex); |
8282 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, | 8282 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
8283 Heap::kUndefinedValueRootIndex); | 8283 Heap::kUndefinedValueRootIndex); |
8284 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8284 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8285 context); | 8285 context); |
8286 return result; | 8286 return result; |
8287 } | 8287 } |
8288 | 8288 |
8289 } // namespace internal | 8289 } // namespace internal |
8290 } // namespace v8 | 8290 } // namespace v8 |
OLD | NEW |