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

Unified Diff: test/cctest/test-reloc-info.cc

Issue 101763003: Replace 'operator*' with explicit 'get' method on SmartPointer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload to make rietveld happy Created 7 years 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 | « test/cctest/test-regexp.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-reloc-info.cc
diff --git a/test/cctest/test-reloc-info.cc b/test/cctest/test-reloc-info.cc
index e638201db2258434fbf7c744d752903992849539..5ab9e803c253b32ebb54b4ad844be76370cb9fc8 100644
--- a/test/cctest/test-reloc-info.cc
+++ b/test/cctest/test-reloc-info.cc
@@ -47,8 +47,8 @@ TEST(Positions) {
const int buffer_size = code_size + relocation_info_size;
SmartArrayPointer<byte> buffer(new byte[buffer_size]);
- byte* pc = *buffer;
- byte* buffer_end = *buffer + buffer_size;
+ byte* pc = buffer.get();
+ byte* buffer_end = buffer.get() + buffer_size;
RelocInfoWriter writer(buffer_end, pc);
byte* relocation_info_end = buffer_end - relocation_info_size;
@@ -60,13 +60,13 @@ TEST(Positions) {
}
relocation_info_size = static_cast<int>(buffer_end - writer.pos());
- CodeDesc desc = { *buffer, buffer_size, code_size,
+ CodeDesc desc = { buffer.get(), buffer_size, code_size,
relocation_info_size, NULL };
// Read only (non-statement) positions.
{
RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::POSITION));
- pc = *buffer;
+ pc = buffer.get();
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
RelocInfo::Mode mode = (i % 2 == 0) ?
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
@@ -83,7 +83,7 @@ TEST(Positions) {
// Read only statement positions.
{
RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION));
- pc = *buffer;
+ pc = buffer.get();
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
RelocInfo::Mode mode = (i % 2 == 0) ?
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
@@ -100,7 +100,7 @@ TEST(Positions) {
// Read both types of positions.
{
RelocIterator it(desc, RelocInfo::kPositionMask);
- pc = *buffer;
+ pc = buffer.get();
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
RelocInfo::Mode mode = (i % 2 == 0) ?
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698