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

Side by Side Diff: test/cctest/interpreter/source-position-matcher.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: reverted v8-debugger change Created 3 years, 8 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "test/cctest/interpreter/source-position-matcher.h" 5 #include "test/cctest/interpreter/source-position-matcher.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 #include "src/objects.h" 8 #include "src/objects.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // 49 //
50 // 5. Expression positions may be dropped when they are applied to 50 // 5. Expression positions may be dropped when they are applied to
51 // bytecodes that manipulate local frame state and immediately 51 // bytecodes that manipulate local frame state and immediately
52 // proceeded by another source position. 52 // proceeded by another source position.
53 // 53 //
54 // 6. The relative ordering of source positions must be preserved. 54 // 6. The relative ordering of source positions must be preserved.
55 // 55 //
56 bool SourcePositionMatcher::Match(Handle<BytecodeArray> original_bytecode, 56 bool SourcePositionMatcher::Match(Handle<BytecodeArray> original_bytecode,
57 Handle<BytecodeArray> optimized_bytecode) { 57 Handle<BytecodeArray> optimized_bytecode) {
58 SourcePositionTableIterator original( 58 SourcePositionTableIterator original(
59 original_bytecode->source_position_table()); 59 original_bytecode->SourcePositionTable());
60 SourcePositionTableIterator optimized( 60 SourcePositionTableIterator optimized(
61 optimized_bytecode->source_position_table()); 61 optimized_bytecode->SourcePositionTable());
62 62
63 int last_original_bytecode_offset = 0; 63 int last_original_bytecode_offset = 0;
64 int last_optimized_bytecode_offset = 0; 64 int last_optimized_bytecode_offset = 0;
65 65
66 // Ordered lists of expression positions immediately before the 66 // Ordered lists of expression positions immediately before the
67 // latest statements in each bytecode array. 67 // latest statements in each bytecode array.
68 std::vector<PositionTableEntry> original_expression_entries; 68 std::vector<PositionTableEntry> original_expression_entries;
69 std::vector<PositionTableEntry> optimized_expression_entries; 69 std::vector<PositionTableEntry> optimized_expression_entries;
70 70
71 while (true) { 71 while (true) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 positions->push_back({iterator->code_offset(), 216 positions->push_back({iterator->code_offset(),
217 iterator->source_position().raw(), 217 iterator->source_position().raw(),
218 iterator->is_statement()}); 218 iterator->is_statement()});
219 iterator->Advance(); 219 iterator->Advance();
220 } 220 }
221 } 221 }
222 222
223 } // namespace interpreter 223 } // namespace interpreter
224 } // namespace internal 224 } // namespace internal
225 } // namespace v8 225 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode-expectations-printer.cc ('k') | test/unittests/interpreter/bytecode-array-writer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698