Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1406983010: [Interpreter] Ensure ToBoolean bytecodes are correctly emitted at the start of basic blocks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 98b7a77d5da14e71732132d9ccd83554ecff3993..868f595a8d6868154e0f0fba99a64e77f12dd556 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -1527,12 +1527,11 @@ TEST(InterpreterUnaryNot) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(0);
- builder.EnterBlock();
builder.LoadFalse();
for (size_t j = 0; j < i; j++) {
builder.LogicalNot();
}
- builder.LeaveBlock().Return();
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array);
auto callable = tester.GetCallable<>();
@@ -1591,10 +1590,9 @@ TEST(InterpreterToBoolean) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(0);
- builder.EnterBlock();
LoadAny(&builder, factory, object_type_tuples[i].first);
builder.CastAccumulatorToBoolean();
- builder.LeaveBlock().Return();
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array);
auto callable = tester.GetCallable<>();
@@ -1629,10 +1627,9 @@ TEST(InterpreterUnaryNotNonBoolean) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(0);
- builder.EnterBlock();
LoadAny(&builder, factory, object_type_tuples[i].first);
builder.LogicalNot();
- builder.LeaveBlock().Return();
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array);
auto callable = tester.GetCallable<>();
@@ -1665,10 +1662,9 @@ TEST(InterpreterTypeOf) {
builder.set_locals_count(0);
builder.set_context_count(0);
builder.set_parameter_count(0);
- builder.EnterBlock();
LoadAny(&builder, factory, object_type_tuples[i].first);
builder.TypeOf();
- builder.LeaveBlock().Return();
+ builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
InterpreterTester tester(handles.main_isolate(), bytecode_array);
auto callable = tester.GetCallable<>();
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698