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 8327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::IsPromiseHookEnabled() { |
8342 Node* const promise_hook = Load( | 8342 Node* const promise_hook = Load( |
8343 MachineType::Pointer(), | 8343 MachineType::Pointer(), |
8344 ExternalConstant(ExternalReference::promise_hook_address(isolate()))); | 8344 ExternalConstant(ExternalReference::promise_hook_address(isolate()))); |
8345 return WordNotEqual(promise_hook, IntPtrConstant(0)); | 8345 return WordNotEqual(promise_hook, IntPtrConstant(0)); |
8346 } | 8346 } |
8347 | 8347 |
| 8348 Node* CodeStubAssembler::IsPromiseHookEnabledOrDebugIsActive() { |
| 8349 Node* const promise_hook_or_debug_is_active = |
| 8350 Load(MachineType::Uint8(), |
| 8351 ExternalConstant( |
| 8352 ExternalReference::promise_hook_or_debug_is_active_address( |
| 8353 isolate()))); |
| 8354 return Word32NotEqual(promise_hook_or_debug_is_active, Int32Constant(0)); |
| 8355 } |
| 8356 |
8348 Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map, | 8357 Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map, |
8349 Node* shared_info, | 8358 Node* shared_info, |
8350 Node* context) { | 8359 Node* context) { |
8351 Node* const code = BitcastTaggedToWord( | 8360 Node* const code = BitcastTaggedToWord( |
8352 LoadObjectField(shared_info, SharedFunctionInfo::kCodeOffset)); | 8361 LoadObjectField(shared_info, SharedFunctionInfo::kCodeOffset)); |
8353 Node* const code_entry = | 8362 Node* const code_entry = |
8354 IntPtrAdd(code, IntPtrConstant(Code::kHeaderSize - kHeapObjectTag)); | 8363 IntPtrAdd(code, IntPtrConstant(Code::kHeaderSize - kHeapObjectTag)); |
8355 | 8364 |
8356 Node* const fun = Allocate(JSFunction::kSize); | 8365 Node* const fun = Allocate(JSFunction::kSize); |
8357 StoreMapNoWriteBarrier(fun, map); | 8366 StoreMapNoWriteBarrier(fun, map); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8393 deferred_on_reject); | 8402 deferred_on_reject); |
8394 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, | 8403 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, |
8395 SmiConstant(kDebugPromiseNoID)); | 8404 SmiConstant(kDebugPromiseNoID)); |
8396 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8405 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8397 context); | 8406 context); |
8398 return result; | 8407 return result; |
8399 } | 8408 } |
8400 | 8409 |
8401 } // namespace internal | 8410 } // namespace internal |
8402 } // namespace v8 | 8411 } // namespace v8 |
OLD | NEW |