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 8363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8374 } | 8374 } |
8375 | 8375 |
8376 Node* CodeStubAssembler::MarkerIsNotFrameType(Node* marker_or_function, | 8376 Node* CodeStubAssembler::MarkerIsNotFrameType(Node* marker_or_function, |
8377 StackFrame::Type frame_type) { | 8377 StackFrame::Type frame_type) { |
8378 return WordNotEqual( | 8378 return WordNotEqual( |
8379 marker_or_function, | 8379 marker_or_function, |
8380 IntPtrConstant(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); | 8380 IntPtrConstant(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); |
8381 } | 8381 } |
8382 | 8382 |
8383 void CodeStubAssembler::Print(const char* s) { | 8383 void CodeStubAssembler::Print(const char* s) { |
8384 #ifdef DEBUG | |
Igor Sheludko
2017/03/10 14:14:45
Spurious change here and below?
danno
2017/03/13 07:22:06
Done.
| |
8385 std::string formatted(s); | 8384 std::string formatted(s); |
8386 formatted += "\n"; | 8385 formatted += "\n"; |
8387 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | 8386 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( |
8388 formatted.c_str(), TENURED); | 8387 formatted.c_str(), TENURED); |
8389 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string)); | 8388 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string)); |
8390 #endif | |
8391 } | 8389 } |
8392 | 8390 |
8393 void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) { | 8391 void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) { |
8394 #ifdef DEBUG | |
8395 if (prefix != nullptr) { | 8392 if (prefix != nullptr) { |
8396 std::string formatted(prefix); | 8393 std::string formatted(prefix); |
8397 formatted += ": "; | 8394 formatted += ": "; |
8398 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | 8395 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( |
8399 formatted.c_str(), TENURED); | 8396 formatted.c_str(), TENURED); |
8400 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 8397 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
8401 HeapConstant(string)); | 8398 HeapConstant(string)); |
8402 } | 8399 } |
8403 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 8400 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
8404 #endif | |
8405 } | 8401 } |
8406 | 8402 |
8407 } // namespace internal | 8403 } // namespace internal |
8408 } // namespace v8 | 8404 } // namespace v8 |
OLD | NEW |