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

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

Issue 1925063002: [debugger,interpreter] add source position to stack checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 7 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
« no previous file with comments | « test/mjsunit/debug-stack-check-position.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 .CompareOperation(Token::Value::EQ, reg) 201 .CompareOperation(Token::Value::EQ, reg)
202 .JumpIfFalse(&start); 202 .JumpIfFalse(&start);
203 // Perform an operation that returns a non-boolean operation to 203 // Perform an operation that returns a non-boolean operation to
204 // generate JumpIfToBooleanTrue/False. 204 // generate JumpIfToBooleanTrue/False.
205 builder.BinaryOperation(Token::Value::ADD, reg) 205 builder.BinaryOperation(Token::Value::ADD, reg)
206 .JumpIfTrue(&start) 206 .JumpIfTrue(&start)
207 .BinaryOperation(Token::Value::ADD, reg) 207 .BinaryOperation(Token::Value::ADD, reg)
208 .JumpIfFalse(&start); 208 .JumpIfFalse(&start);
209 209
210 // Emit stack check bytecode. 210 // Emit stack check bytecode.
211 builder.StackCheck(); 211 builder.StackCheck(0);
212 212
213 // Emit throw and re-throw in it's own basic block so that the rest of the 213 // Emit throw and re-throw in it's own basic block so that the rest of the
214 // code isn't omitted due to being dead. 214 // code isn't omitted due to being dead.
215 BytecodeLabel after_throw; 215 BytecodeLabel after_throw;
216 builder.Jump(&after_throw).Throw().Bind(&after_throw); 216 builder.Jump(&after_throw).Throw().Bind(&after_throw);
217 BytecodeLabel after_rethrow; 217 BytecodeLabel after_rethrow;
218 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow); 218 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow);
219 219
220 builder.ForInPrepare(reg) 220 builder.ForInPrepare(reg)
221 .ForInDone(reg, reg) 221 .ForInDone(reg, reg)
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 static_cast<size_t>(kMaxUInt16)) == OperandSize::kShort); 782 static_cast<size_t>(kMaxUInt16)) == OperandSize::kShort);
783 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( 783 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
784 static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad); 784 static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad);
785 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( 785 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand(
786 static_cast<size_t>(kMaxUInt32)) == OperandSize::kQuad); 786 static_cast<size_t>(kMaxUInt32)) == OperandSize::kQuad);
787 } 787 }
788 788
789 } // namespace interpreter 789 } // namespace interpreter
790 } // namespace internal 790 } // namespace internal
791 } // namespace v8 791 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/debug-stack-check-position.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698