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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 1925063002: [debugger,interpreter] add source position to stack checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/interpreter/interpreter-intrinsics.h" 7 #include "src/interpreter/interpreter-intrinsics.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfNull(BytecodeLabel* label) { 854 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfNull(BytecodeLabel* label) {
855 return OutputJump(Bytecode::kJumpIfNull, label); 855 return OutputJump(Bytecode::kJumpIfNull, label);
856 } 856 }
857 857
858 858
859 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfUndefined( 859 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfUndefined(
860 BytecodeLabel* label) { 860 BytecodeLabel* label) {
861 return OutputJump(Bytecode::kJumpIfUndefined, label); 861 return OutputJump(Bytecode::kJumpIfUndefined, label);
862 } 862 }
863 863
864 BytecodeArrayBuilder& BytecodeArrayBuilder::StackCheck() { 864 BytecodeArrayBuilder& BytecodeArrayBuilder::StackCheck(int position) {
865 DCHECK_NE(RelocInfo::kNoPosition, position);
866 // We need to attach a non-breakable source position to a stack check, so we
867 // simply add it as expression position.
868 source_position_table_builder_.AddExpressionPosition(bytecodes_.size(),
Michael Starzinger 2016/04/28 12:06:52 suggestion: Do you think it would make sense to ad
869 position);
865 Output(Bytecode::kStackCheck); 870 Output(Bytecode::kStackCheck);
866 return *this; 871 return *this;
867 } 872 }
868 873
869 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfNotHole( 874 BytecodeArrayBuilder& BytecodeArrayBuilder::JumpIfNotHole(
870 BytecodeLabel* label) { 875 BytecodeLabel* label) {
871 return OutputJump(Bytecode::kJumpIfNotHole, label); 876 return OutputJump(Bytecode::kJumpIfNotHole, label);
872 } 877 }
873 878
874 BytecodeArrayBuilder& BytecodeArrayBuilder::Throw() { 879 BytecodeArrayBuilder& BytecodeArrayBuilder::Throw() {
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 } 1494 }
1490 1495
1491 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) { 1496 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) {
1492 DCHECK_LE(value, kMaxUInt32); 1497 DCHECK_LE(value, kMaxUInt32);
1493 return static_cast<uint32_t>(value); 1498 return static_cast<uint32_t>(value);
1494 } 1499 }
1495 1500
1496 } // namespace interpreter 1501 } // namespace interpreter
1497 } // namespace internal 1502 } // namespace internal
1498 } // namespace v8 1503 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698