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 8328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8339 StoreObjectFieldNoWriteBarrier( | 8339 StoreObjectFieldNoWriteBarrier( |
8340 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, | 8340 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, |
8341 deferred_on_reject); | 8341 deferred_on_reject); |
8342 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8342 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8343 context); | 8343 context); |
8344 return result; | 8344 return result; |
8345 } | 8345 } |
8346 | 8346 |
8347 Node* CodeStubAssembler::MarkerIsFrameType(Node* marker_or_function, | 8347 Node* CodeStubAssembler::MarkerIsFrameType(Node* marker_or_function, |
8348 StackFrame::Type frame_type) { | 8348 StackFrame::Type frame_type) { |
8349 return WordEqual( | 8349 return WordEqual(marker_or_function, |
8350 marker_or_function, | 8350 IntPtrConstant(StackFrame::TypeToMarker(frame_type))); |
8351 IntPtrConstant(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); | |
8352 } | 8351 } |
8353 | 8352 |
8354 Node* CodeStubAssembler::MarkerIsNotFrameType(Node* marker_or_function, | 8353 Node* CodeStubAssembler::MarkerIsNotFrameType(Node* marker_or_function, |
8355 StackFrame::Type frame_type) { | 8354 StackFrame::Type frame_type) { |
8356 return WordNotEqual( | 8355 return WordNotEqual(marker_or_function, |
8357 marker_or_function, | 8356 IntPtrConstant(StackFrame::TypeToMarker(frame_type))); |
8358 IntPtrConstant(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); | |
8359 } | 8357 } |
8360 | 8358 |
8361 void CodeStubAssembler::Print(const char* s) { | 8359 void CodeStubAssembler::Print(const char* s) { |
8362 #ifdef DEBUG | 8360 #ifdef DEBUG |
8363 std::string formatted(s); | 8361 std::string formatted(s); |
8364 formatted += "\n"; | 8362 formatted += "\n"; |
8365 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | 8363 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( |
8366 formatted.c_str(), TENURED); | 8364 formatted.c_str(), TENURED); |
8367 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string)); | 8365 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string)); |
8368 #endif | 8366 #endif |
8369 } | 8367 } |
8370 | 8368 |
8371 void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) { | 8369 void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) { |
8372 #ifdef DEBUG | 8370 #ifdef DEBUG |
8373 if (prefix != nullptr) { | 8371 if (prefix != nullptr) { |
8374 std::string formatted(prefix); | 8372 std::string formatted(prefix); |
8375 formatted += ": "; | 8373 formatted += ": "; |
8376 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | 8374 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( |
8377 formatted.c_str(), TENURED); | 8375 formatted.c_str(), TENURED); |
8378 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 8376 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
8379 HeapConstant(string)); | 8377 HeapConstant(string)); |
8380 } | 8378 } |
8381 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 8379 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
8382 #endif | 8380 #endif |
8383 } | 8381 } |
8384 | 8382 |
8385 } // namespace internal | 8383 } // namespace internal |
8386 } // namespace v8 | 8384 } // namespace v8 |
OLD | NEW |