summaryrefslogtreecommitdiff
path: root/deps/v8/src/source-position-table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/source-position-table.cc')
-rw-r--r--deps/v8/src/source-position-table.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/deps/v8/src/source-position-table.cc b/deps/v8/src/source-position-table.cc
index f7697e5694..f7306c82ce 100644
--- a/deps/v8/src/source-position-table.cc
+++ b/deps/v8/src/source-position-table.cc
@@ -4,7 +4,6 @@
#include "src/source-position-table.h"
-#include "src/log.h"
#include "src/objects-inl.h"
#include "src/objects.h"
@@ -48,7 +47,7 @@ void SubtractFromEntry(PositionTableEntry& value,
// Helper: Encode an integer.
template <typename T>
-void EncodeInt(ZoneVector<byte>& bytes, T value) {
+void EncodeInt(std::vector<byte>& bytes, T value) {
// Zig-zag encoding.
static const int kShift = sizeof(T) * kBitsPerByte - 1;
value = ((value << 1) ^ (value >> kShift));
@@ -65,9 +64,9 @@ void EncodeInt(ZoneVector<byte>& bytes, T value) {
}
// Encode a PositionTableEntry.
-void EncodeEntry(ZoneVector<byte>& bytes, const PositionTableEntry& entry) {
+void EncodeEntry(std::vector<byte>& bytes, const PositionTableEntry& entry) {
// We only accept ascending code offsets.
- DCHECK(entry.code_offset >= 0);
+ DCHECK_GE(entry.code_offset, 0);
// Since code_offset is not negative, we use sign to encode is_statement.
EncodeInt(bytes,
entry.is_statement ? entry.code_offset : -entry.code_offset - 1);
@@ -109,14 +108,8 @@ void DecodeEntry(ByteArray* bytes, int* index, PositionTableEntry* entry) {
} // namespace
SourcePositionTableBuilder::SourcePositionTableBuilder(
- Zone* zone, SourcePositionTableBuilder::RecordingMode mode)
- : mode_(mode),
- bytes_(zone),
-#ifdef ENABLE_SLOW_DCHECKS
- raw_entries_(zone),
-#endif
- previous_() {
-}
+ SourcePositionTableBuilder::RecordingMode mode)
+ : mode_(mode), previous_() {}
void SourcePositionTableBuilder::AddPosition(size_t code_offset,
SourcePosition source_position,
@@ -138,7 +131,7 @@ void SourcePositionTableBuilder::AddEntry(const PositionTableEntry& entry) {
}
Handle<ByteArray> SourcePositionTableBuilder::ToSourcePositionTable(
- Isolate* isolate, Handle<AbstractCode> code) {
+ Isolate* isolate) {
if (bytes_.empty()) return isolate->factory()->empty_byte_array();
DCHECK(!Omit());
@@ -147,8 +140,6 @@ Handle<ByteArray> SourcePositionTableBuilder::ToSourcePositionTable(
MemCopy(table->GetDataStartAddress(), &*bytes_.begin(), bytes_.size());
- LOG_CODE_EVENT(isolate, CodeLinePosInfoRecordEvent(*code, *table));
-
#ifdef ENABLE_SLOW_DCHECKS
// Brute force testing: Record all positions and decode
// the entire table to verify they are identical.