Index: test/cctest/interpreter/bytecode-expectations-printer.cc |
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.cc b/test/cctest/interpreter/bytecode-expectations-printer.cc |
index f7492b502f270d129b78f9e5d45e8c870a9b6407..a1e3ce62381d4d8ce825e1ab8dd4e894d06e383f 100644 |
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc |
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc |
@@ -328,11 +328,13 @@ void BytecodeExpectationsPrinter::PrintExpectation( |
v8::Local<v8::Script> script = Compile(source_code.c_str()); |
- if (execute_) Run(script); |
- |
- i::Handle<i::BytecodeArray> bytecode_array = |
- top_level_ ? GetBytecodeArrayForScript(script) |
- : GetBytecodeArrayForGlobal(test_function_name_.c_str()); |
+ i::Handle<i::BytecodeArray> bytecode_array; |
+ if (top_level_) { |
+ bytecode_array = GetBytecodeArrayForScript(script); |
+ } else { |
+ Run(script); |
+ bytecode_array = GetBytecodeArrayForGlobal(test_function_name_.c_str()); |
+ } |
stream << "---\n"; |
PrintCodeSnippet(stream, snippet); |