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

Side by Side Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1092923002: Remove support for externally backed elements from the API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <limits> 5 #include <limits>
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/change-lowering.h" 8 #include "src/compiler/change-lowering.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 CHECK_EQ(*src, array->get(1)); 251 CHECK_EQ(*src, array->get(1));
252 } 252 }
253 } 253 }
254 254
255 255
256 TEST(RunLoadStoreArrayBuffer) { 256 TEST(RunLoadStoreArrayBuffer) {
257 SimplifiedLoweringTester<Object*> t(kMachAnyTagged); 257 SimplifiedLoweringTester<Object*> t(kMachAnyTagged);
258 const int index = 12; 258 const int index = 12;
259 const int array_length = 2 * index; 259 const int array_length = 2 * index;
260 ElementAccess buffer_access = 260 ElementAccess buffer_access =
261 AccessBuilder::ForTypedArrayElement(v8::kExternalInt8Array, true); 261 AccessBuilder::ForTypedArrayElement(kExternalInt8Array, true);
262 Node* backing_store = t.LoadField( 262 Node* backing_store = t.LoadField(
263 AccessBuilder::ForJSArrayBufferBackingStore(), t.Parameter(0)); 263 AccessBuilder::ForJSArrayBufferBackingStore(), t.Parameter(0));
264 Node* load = 264 Node* load =
265 t.LoadElement(buffer_access, backing_store, t.Int32Constant(index)); 265 t.LoadElement(buffer_access, backing_store, t.Int32Constant(index));
266 t.StoreElement(buffer_access, backing_store, t.Int32Constant(index + 1), 266 t.StoreElement(buffer_access, backing_store, t.Int32Constant(index + 1),
267 load); 267 load);
268 t.Return(t.jsgraph.TrueConstant()); 268 t.Return(t.jsgraph.TrueConstant());
269 269
270 t.LowerAllNodes(); 270 t.LowerAllNodes();
271 t.GenerateCode(); 271 t.GenerateCode();
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); 2053 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z);
2054 NodeProperties::SetBounds(phi, phi_bounds); 2054 NodeProperties::SetBounds(phi, phi_bounds);
2055 2055
2056 Node* use = t.Use(phi, d.use); 2056 Node* use = t.Use(phi, d.use);
2057 t.Return(use); 2057 t.Return(use);
2058 t.Lower(); 2058 t.Lower();
2059 2059
2060 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2060 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2061 } 2061 }
2062 } 2062 }
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698