| 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 8229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8240 } | 8240 } |
| 8241 | 8241 |
| 8242 Node* CodeStubAssembler::IsDebugActive() { | 8242 Node* CodeStubAssembler::IsDebugActive() { |
| 8243 Node* is_debug_active = Load( | 8243 Node* is_debug_active = Load( |
| 8244 MachineType::Uint8(), | 8244 MachineType::Uint8(), |
| 8245 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8245 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
| 8246 return Word32NotEqual(is_debug_active, Int32Constant(0)); | 8246 return Word32NotEqual(is_debug_active, Int32Constant(0)); |
| 8247 } | 8247 } |
| 8248 | 8248 |
| 8249 Node* CodeStubAssembler::IsPromiseHookEnabled() { | 8249 Node* CodeStubAssembler::IsPromiseHookEnabled() { |
| 8250 Node* const is_promisehook_enabled = | 8250 Node* const promise_hook = Load( |
| 8251 Load(MachineType::Uint8(), | 8251 MachineType::Pointer(), |
| 8252 ExternalConstant( | 8252 ExternalConstant(ExternalReference::promise_hook_address(isolate()))); |
| 8253 ExternalReference::is_promisehook_enabled_address(isolate()))); | 8253 return WordNotEqual(promise_hook, IntPtrConstant(0)); |
| 8254 return Word32NotEqual(is_promisehook_enabled, Int32Constant(0)); | |
| 8255 } | 8254 } |
| 8256 | 8255 |
| 8257 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { | 8256 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { |
| 8258 Node* const native_context = LoadNativeContext(context); | 8257 Node* const native_context = LoadNativeContext(context); |
| 8259 Node* const promise_fun = | 8258 Node* const promise_fun = |
| 8260 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); | 8259 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); |
| 8261 Node* const initial_map = | 8260 Node* const initial_map = |
| 8262 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); | 8261 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); |
| 8263 Node* const instance = AllocateJSObjectFromMap(initial_map); | 8262 Node* const instance = AllocateJSObjectFromMap(initial_map); |
| 8264 | 8263 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 8294 Heap::kUndefinedValueRootIndex); | 8293 Heap::kUndefinedValueRootIndex); |
| 8295 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, | 8294 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
| 8296 Heap::kUndefinedValueRootIndex); | 8295 Heap::kUndefinedValueRootIndex); |
| 8297 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8296 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
| 8298 context); | 8297 context); |
| 8299 return result; | 8298 return result; |
| 8300 } | 8299 } |
| 8301 | 8300 |
| 8302 } // namespace internal | 8301 } // namespace internal |
| 8303 } // namespace v8 | 8302 } // namespace v8 |
| OLD | NEW |