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

Unified Diff: src/objects.cc

Issue 1704943002: Encode interpreter::SourcePositionTable as variable-length ints. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More review feedback. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 2bf21a2c6d82a9b1191b83c1f16dc5b7401d81a5..fbc43b1fc496286e4c4ce52c69e9dcb9f27683e1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15179,7 +15179,8 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
int BytecodeArray::SourcePosition(int offset) {
int last_position = 0;
- for (interpreter::SourcePositionTableIterator iterator(this);
+ for (interpreter::SourcePositionTableIterator iterator(
+ source_position_table());
!iterator.done() && iterator.bytecode_offset() <= offset;
iterator.Advance()) {
last_position = iterator.source_position();
@@ -15193,7 +15194,7 @@ int BytecodeArray::SourceStatementPosition(int offset) {
int position = SourcePosition(offset);
// Now find the closest statement position before the position.
int statement_position = 0;
- interpreter::SourcePositionTableIterator iterator(this);
+ interpreter::SourcePositionTableIterator iterator(source_position_table());
while (!iterator.done()) {
if (iterator.is_statement()) {
int p = iterator.source_position();
@@ -15214,7 +15215,8 @@ void BytecodeArray::Disassemble(std::ostream& os) {
const uint8_t* first_bytecode_address = GetFirstBytecodeAddress();
int bytecode_size = 0;
- interpreter::SourcePositionTableIterator source_positions(this);
+ interpreter::SourcePositionTableIterator source_positions(
+ source_position_table());
for (int i = 0; i < this->length(); i += bytecode_size) {
const uint8_t* bytecode_start = &first_bytecode_address[i];
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698