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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1667073002: [interpreter, debugger] implement debugger statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepositiontable
Patch Set: fix test expectation Created 4 years, 10 months 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 unified diff | Download patch
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 .JumpIfTrue(&start) 271 .JumpIfTrue(&start)
272 .CompareOperation(Token::Value::EQ, reg, Strength::WEAK) 272 .CompareOperation(Token::Value::EQ, reg, Strength::WEAK)
273 .JumpIfFalse(&start); 273 .JumpIfFalse(&start);
274 // Perform an operation that returns a non-boolean operation to 274 // Perform an operation that returns a non-boolean operation to
275 // generate JumpIfToBooleanTrue/False. 275 // generate JumpIfToBooleanTrue/False.
276 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 276 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
277 .JumpIfTrue(&start) 277 .JumpIfTrue(&start)
278 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 278 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
279 .JumpIfFalse(&start); 279 .JumpIfFalse(&start);
280 280
281 builder.Debugger();
282
281 builder.Return(); 283 builder.Return();
282 284
283 // Generate BytecodeArray. 285 // Generate BytecodeArray.
284 Handle<BytecodeArray> the_array = builder.ToBytecodeArray(); 286 Handle<BytecodeArray> the_array = builder.ToBytecodeArray();
285 CHECK_EQ(the_array->frame_size(), 287 CHECK_EQ(the_array->frame_size(),
286 (builder.fixed_and_temporary_register_count() + 288 (builder.fixed_and_temporary_register_count() +
287 builder.translation_register_count()) * 289 builder.translation_register_count()) *
288 kPointerSize); 290 kPointerSize);
289 291
290 // Build scorecard of bytecodes encountered in the BytecodeArray. 292 // Build scorecard of bytecodes encountered in the BytecodeArray.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 iterator.Advance(); 656 iterator.Advance();
655 } 657 }
656 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 658 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
657 iterator.Advance(); 659 iterator.Advance();
658 CHECK(iterator.done()); 660 CHECK(iterator.done());
659 } 661 }
660 662
661 } // namespace interpreter 663 } // namespace interpreter
662 } // namespace internal 664 } // namespace internal
663 } // namespace v8 665 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/ignition/debugger-statement.js ('k') | test/unittests/interpreter/bytecode-array-iterator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698