| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <fstream> | 5 #include <fstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/interpreter/bytecode-array-iterator.h" | 10 #include "src/interpreter/bytecode-array-iterator.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 "return 0;\n", | 171 "return 0;\n", |
| 172 | 172 |
| 173 "return +1;\n", | 173 "return +1;\n", |
| 174 | 174 |
| 175 "return -1;\n", | 175 "return -1;\n", |
| 176 | 176 |
| 177 "return +127;\n", | 177 "return +127;\n", |
| 178 | 178 |
| 179 "return -128;\n", | 179 "return -128;\n", |
| 180 |
| 181 "return 2.0;\n", |
| 180 }; | 182 }; |
| 181 | 183 |
| 182 CHECK(CompareTexts(BuildActual(printer, snippets), | 184 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 183 LoadGolden("PrimitiveReturnStatements.golden"))); | 185 LoadGolden("PrimitiveReturnStatements.golden"))); |
| 184 } | 186 } |
| 185 | 187 |
| 186 TEST(PrimitiveExpressions) { | 188 TEST(PrimitiveExpressions) { |
| 187 InitializedIgnitionHandleScope scope; | 189 InitializedIgnitionHandleScope scope; |
| 188 BytecodeExpectationsPrinter printer(CcTest::isolate(), | 190 BytecodeExpectationsPrinter printer(CcTest::isolate(), |
| 189 ConstantPoolType::kNumber); | 191 ConstantPoolType::kNumber); |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2244 | 2246 |
| 2245 CHECK(CompareTexts(BuildActual(printer, snippets), | 2247 CHECK(CompareTexts(BuildActual(printer, snippets), |
| 2246 LoadGolden("Generators.golden"))); | 2248 LoadGolden("Generators.golden"))); |
| 2247 | 2249 |
| 2248 FLAG_ignition_generators = old_flag; | 2250 FLAG_ignition_generators = old_flag; |
| 2249 } | 2251 } |
| 2250 | 2252 |
| 2251 } // namespace interpreter | 2253 } // namespace interpreter |
| 2252 } // namespace internal | 2254 } // namespace internal |
| 2253 } // namespace v8 | 2255 } // namespace v8 |
| OLD | NEW |