| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 | 4 |
| 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 if (use_result_buffer) { | 103 if (use_result_buffer) { |
| 104 CHECK_EQ(CHECK_VALUE, T->Call()); | 104 CHECK_EQ(CHECK_VALUE, T->Call()); |
| 105 return result; | 105 return result; |
| 106 } else { | 106 } else { |
| 107 return static_cast<CType>(T->Call()); | 107 return static_cast<CType>(T->Call()); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 void AddReturn(Node* val) { | 111 void AddReturn(Node* val) { |
| 112 if (use_result_buffer) { | 112 if (use_result_buffer) { |
| 113 T->Store(rep, T->PointerConstant(&result), T->Int32Constant(0), val); | 113 T->Store(StoreRepresentation(rep, kNoWriteBarrier), |
| 114 T->PointerConstant(&result), T->Int32Constant(0), val); |
| 114 T->Return(T->Int32Constant(CHECK_VALUE)); | 115 T->Return(T->Int32Constant(CHECK_VALUE)); |
| 115 } else { | 116 } else { |
| 116 T->Return(val); | 117 T->Return(val); |
| 117 } | 118 } |
| 118 } | 119 } |
| 119 | 120 |
| 120 template <typename Ci, typename Cj, typename Fn> | 121 template <typename Ci, typename Cj, typename Fn> |
| 121 void Run(const Ci& ci, const Cj& cj, const Fn& fn) { | 122 void Run(const Ci& ci, const Cj& cj, const Fn& fn) { |
| 122 typename Ci::const_iterator i; | 123 typename Ci::const_iterator i; |
| 123 typename Cj::const_iterator j; | 124 typename Cj::const_iterator j; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } else { | 321 } else { |
| 321 CHECK_EQ(x, y); | 322 CHECK_EQ(x, y); |
| 322 } | 323 } |
| 323 } | 324 } |
| 324 | 325 |
| 325 } // namespace compiler | 326 } // namespace compiler |
| 326 } // namespace internal | 327 } // namespace internal |
| 327 } // namespace v8 | 328 } // namespace v8 |
| 328 | 329 |
| 329 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 330 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| OLD | NEW |