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

Unified Diff: test/cctest/wasm/test-run-wasm-interpreter.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 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 | « test/cctest/test-regexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-interpreter.cc
diff --git a/test/cctest/wasm/test-run-wasm-interpreter.cc b/test/cctest/wasm/test-run-wasm-interpreter.cc
index 42b0f8811286a00968f68a650d6a8f7cf658bde9..c4e03b50d6138cbf45c124fa06c3efeee2890378 100644
--- a/test/cctest/wasm/test-run-wasm-interpreter.cc
+++ b/test/cctest/wasm/test-run-wasm-interpreter.cc
@@ -6,6 +6,8 @@
#include <stdlib.h>
#include <string.h>
+#include <memory>
+
#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-interpreter.h"
@@ -138,11 +140,11 @@ TEST(Run_Wasm_nested_ifs_i) {
// Make tests more robust by not hard-coding offsets of various operations.
// The {Find} method finds the offsets for the given bytecodes, returning
// the offsets in an array.
-SmartArrayPointer<int> Find(byte* code, size_t code_size, int n, ...) {
+std::unique_ptr<int[]> Find(byte* code, size_t code_size, int n, ...) {
va_list vl;
va_start(vl, n);
- SmartArrayPointer<int> offsets(new int[n]);
+ std::unique_ptr<int[]> offsets(new int[n]);
for (int i = 0; i < n; i++) {
offsets[i] = -1;
@@ -166,7 +168,7 @@ TEST(Breakpoint_I32Add) {
static const int kLocalsDeclSize = 1;
static const int kNumBreakpoints = 3;
byte code[] = {WASM_I32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
- SmartArrayPointer<int> offsets =
+ std::unique_ptr<int[]> offsets =
Find(code, sizeof(code), kNumBreakpoints, kExprGetLocal, kExprGetLocal,
kExprI32Add);
@@ -245,7 +247,7 @@ TEST(Breakpoint_I32And_disable) {
static const int kLocalsDeclSize = 1;
static const int kNumBreakpoints = 1;
byte code[] = {WASM_I32_AND(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
- SmartArrayPointer<int> offsets =
+ std::unique_ptr<int[]> offsets =
Find(code, sizeof(code), kNumBreakpoints, kExprI32And);
WasmRunner<int32_t> r(kExecuteInterpreted, MachineType::Uint32(),
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698