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 8224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8235 } | 8235 } |
8236 | 8236 |
8237 Node* CodeStubAssembler::IsDebugActive() { | 8237 Node* CodeStubAssembler::IsDebugActive() { |
8238 Node* is_debug_active = Load( | 8238 Node* is_debug_active = Load( |
8239 MachineType::Uint8(), | 8239 MachineType::Uint8(), |
8240 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8240 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
8241 return Word32NotEqual(is_debug_active, Int32Constant(0)); | 8241 return Word32NotEqual(is_debug_active, Int32Constant(0)); |
8242 } | 8242 } |
8243 | 8243 |
8244 Node* CodeStubAssembler::IsPromiseHookEnabled() { | 8244 Node* CodeStubAssembler::IsPromiseHookEnabled() { |
8245 Node* const is_promisehook_enabled = | 8245 Node* const promise_hook = Load( |
8246 Load(MachineType::Uint8(), | 8246 MachineType::Uint8(), |
adamk
2016/12/15 15:43:58
Probably this needs to change now that it's a poin
gsathya
2016/12/15 16:32:06
Doh, ofc. Sorry for being sloppy!
| |
8247 ExternalConstant( | 8247 ExternalConstant(ExternalReference::promise_hook_address(isolate()))); |
8248 ExternalReference::is_promisehook_enabled_address(isolate()))); | 8248 return Word32NotEqual(promise_hook, Int32Constant(0)); |
8249 return Word32NotEqual(is_promisehook_enabled, Int32Constant(0)); | |
8250 } | 8249 } |
8251 | 8250 |
8252 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { | 8251 Node* CodeStubAssembler::AllocateJSPromise(Node* context) { |
8253 Node* const native_context = LoadNativeContext(context); | 8252 Node* const native_context = LoadNativeContext(context); |
8254 Node* const promise_fun = | 8253 Node* const promise_fun = |
8255 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); | 8254 LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); |
8256 Node* const initial_map = | 8255 Node* const initial_map = |
8257 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); | 8256 LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset); |
8258 Node* const instance = AllocateJSObjectFromMap(initial_map); | 8257 Node* const instance = AllocateJSObjectFromMap(initial_map); |
8259 | 8258 |
(...skipping 29 matching lines...) Expand all Loading... | |
8289 Heap::kUndefinedValueRootIndex); | 8288 Heap::kUndefinedValueRootIndex); |
8290 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, | 8289 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
8291 Heap::kUndefinedValueRootIndex); | 8290 Heap::kUndefinedValueRootIndex); |
8292 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8291 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8293 context); | 8292 context); |
8294 return result; | 8293 return result; |
8295 } | 8294 } |
8296 | 8295 |
8297 } // namespace internal | 8296 } // namespace internal |
8298 } // namespace v8 | 8297 } // namespace v8 |
OLD | NEW |