Chromium Code Reviews| 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 8380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8391 StoreObjectFieldNoWriteBarrier( | 8391 StoreObjectFieldNoWriteBarrier( | 
| 8392 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, | 8392 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, | 
| 8393 deferred_on_reject); | 8393 deferred_on_reject); | 
| 8394 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, | 8394 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, | 
| 8395 SmiConstant(kDebugPromiseNoID)); | 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 void CodeStubAssembler::Print(const char* s) { | |
| 8402 #ifdef DEBUG | |
| 8403 std::string formatted(s); | |
| 8404 formatted += "\n"; | |
| 8405 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | |
| 8406 formatted.c_str(), TENURED); | |
| 8407 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string)); | |
| 8408 #endif | |
| 8409 } | |
| 8410 | |
| 8411 void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) { | |
| 8412 #ifdef DEBUG | |
| 8413 if (prefix != nullptr) { | |
| 8414 std::string formatted(prefix); | |
| 8415 formatted += ": "; | |
| 8416 Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked( | |
| 8417 formatted.c_str(), TENURED); | |
| 8418 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | |
| 8419 HeapConstant(string)); | |
| 8420 } | |
| 8421 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), tagged_value); | |
| 
 
caitp
2017/01/24 13:30:37
Is there any way to assert that the value outputs
 
 | |
| 8422 #endif | |
| 8423 } | |
| 8424 | |
| 8401 } // namespace internal | 8425 } // namespace internal | 
| 8402 } // namespace v8 | 8426 } // namespace v8 | 
| OLD | NEW |