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 8320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8331 return Word32Equal(holey_elements, Int32Constant(1)); | 8331 return Word32Equal(holey_elements, Int32Constant(1)); |
8332 } | 8332 } |
8333 | 8333 |
8334 Node* CodeStubAssembler::IsDebugActive() { | 8334 Node* CodeStubAssembler::IsDebugActive() { |
8335 Node* is_debug_active = Load( | 8335 Node* is_debug_active = Load( |
8336 MachineType::Uint8(), | 8336 MachineType::Uint8(), |
8337 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8337 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
8338 return Word32NotEqual(is_debug_active, Int32Constant(0)); | 8338 return Word32NotEqual(is_debug_active, Int32Constant(0)); |
8339 } | 8339 } |
8340 | 8340 |
8341 Node* CodeStubAssembler::IsPromiseHookEnabled() { | 8341 Node* CodeStubAssembler::IsPromiseHookEnabledOrDebugIsActive() { |
8342 Node* const promise_hook = Load( | 8342 Node* const promise_hook_or_debug_is_active = |
8343 MachineType::Pointer(), | 8343 Load(MachineType::Uint8(), |
8344 ExternalConstant(ExternalReference::promise_hook_address(isolate()))); | 8344 ExternalConstant( |
8345 return WordNotEqual(promise_hook, IntPtrConstant(0)); | 8345 ExternalReference::promise_hook_or_debug_is_active_address( |
| 8346 isolate()))); |
| 8347 return Word32NotEqual(promise_hook_or_debug_is_active, Int32Constant(0)); |
8346 } | 8348 } |
8347 | 8349 |
8348 Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map, | 8350 Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map, |
8349 Node* shared_info, | 8351 Node* shared_info, |
8350 Node* context) { | 8352 Node* context) { |
8351 Node* const code = BitcastTaggedToWord( | 8353 Node* const code = BitcastTaggedToWord( |
8352 LoadObjectField(shared_info, SharedFunctionInfo::kCodeOffset)); | 8354 LoadObjectField(shared_info, SharedFunctionInfo::kCodeOffset)); |
8353 Node* const code_entry = | 8355 Node* const code_entry = |
8354 IntPtrAdd(code, IntPtrConstant(Code::kHeaderSize - kHeapObjectTag)); | 8356 IntPtrAdd(code, IntPtrConstant(Code::kHeaderSize - kHeapObjectTag)); |
8355 | 8357 |
(...skipping 28 matching lines...) Expand all Loading... |
8384 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, | 8386 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, |
8385 tasks); | 8387 tasks); |
8386 StoreObjectFieldNoWriteBarrier( | 8388 StoreObjectFieldNoWriteBarrier( |
8387 result, PromiseReactionJobInfo::kDeferredPromiseOffset, deferred_promise); | 8389 result, PromiseReactionJobInfo::kDeferredPromiseOffset, deferred_promise); |
8388 StoreObjectFieldNoWriteBarrier( | 8390 StoreObjectFieldNoWriteBarrier( |
8389 result, PromiseReactionJobInfo::kDeferredOnResolveOffset, | 8391 result, PromiseReactionJobInfo::kDeferredOnResolveOffset, |
8390 deferred_on_resolve); | 8392 deferred_on_resolve); |
8391 StoreObjectFieldNoWriteBarrier( | 8393 StoreObjectFieldNoWriteBarrier( |
8392 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, | 8394 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, |
8393 deferred_on_reject); | 8395 deferred_on_reject); |
8394 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, | |
8395 SmiConstant(kDebugPromiseNoID)); | |
8396 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8396 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8397 context); | 8397 context); |
8398 return result; | 8398 return result; |
8399 } | 8399 } |
8400 | 8400 |
8401 } // namespace internal | 8401 } // namespace internal |
8402 } // namespace v8 | 8402 } // namespace v8 |
OLD | NEW |