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

Side by Side Diff: test/mjsunit/regress/regress-610633.js

Issue 1977983002: Revert "Fix TypedArray Property optimizations", add regression test and eliminate dead code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments Created 4 years, 7 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 | « test/cctest/interpreter/bytecode_expectations/CallRuntime.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 function getLength(a) {
6 return a.length;
7 }
8
9 function getByteLength(a) {
10 return a.byteLength;
11 }
12
13 function getByteOffset(a) {
14 return a.byteOffset;
15 }
16
17 var a = new Uint8Array([1, 2, 3]);
18 getLength(a);
19 getLength(a);
20
21 Object.defineProperty(a.__proto__, 'length', {value: 42});
22
23 assertEquals(42, getLength(a));
24 assertEquals(42, a.length);
25
26 getByteLength(a);
27 getByteLength(a);
28
29 Object.defineProperty(a.__proto__, 'byteLength', {value: 42});
30
31 assertEquals(42, getByteLength(a));
32 assertEquals(42, a.byteLength);
33
34 getByteOffset(a);
35 getByteOffset(a);
36
37 Object.defineProperty(a.__proto__, 'byteOffset', {value: 42});
38
39 assertEquals(42, getByteOffset(a));
40 assertEquals(42, a.byteOffset);
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/CallRuntime.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698