| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 77cbc26 commit 84bf04b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,16 +27,13 @@ var simdFormatters; | |||
| 27 | 27 | if (typeof global.SIMD === 'object' && global.SIMD !== null) { | |
| 28 | 28 | simdFormatters = new Map(); | |
| 29 | 29 | ||
| 30 | - const make = (extractLane, count) => { | ||
| 31 | - return (ctx, value, recurseTimes, visibleKeys, keys) => { | ||
| 30 | + const make = | ||
| 31 | + (extractLane, count) => (ctx, value, recurseTimes, visibleKeys, keys) => { | ||
| 32 | 32 | const output = new Array(count); | |
| 33 | 33 | for (var i = 0; i < count; i += 1) | |
| 34 | 34 | output[i] = formatPrimitive(ctx, extractLane(value, i)); | |
| 35 | 35 | return output; | |
| 36 | 36 | }; | |
| 37 | - }; | ||
| 38 | - | ||
| 39 | - const SIMD = global.SIMD; // Pacify eslint. | ||
| 40 | 37 | ||
| 41 | 38 | const countPerType = { | |
| 42 | 39 | Bool16x8: 8, | |
@@ -52,7 +49,7 @@ if (typeof global.SIMD === 'object' && global.SIMD !== null) { | |||
| 52 | 49 | }; | |
| 53 | 50 | ||
| 54 | 51 | for (const key in countPerType) { | |
| 55 | - const type = SIMD[key]; | ||
| 52 | + const type = global.SIMD[key]; | ||
| 56 | 53 | simdFormatters.set(type, make(type.extractLane, countPerType[key])); | |
| 57 | 54 | } | |
| 58 | 55 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,11 @@ | |||
| 1 | 1 | // Flags: --harmony_simd | |
| 2 | + /* global SIMD */ | ||
| 2 | 3 | 'use strict'; | |
| 3 | 4 | ||
| 4 | 5 | require('../common'); | |
| 5 | 6 | const assert = require('assert'); | |
| 6 | 7 | const inspect = require('util').inspect; | |
| 7 | 8 | ||
| 8 | - const SIMD = global.SIMD; // Pacify eslint. | ||
| 9 | - | ||
| 10 | 9 | assert.strictEqual( | |
| 11 | 10 | inspect(SIMD.Bool16x8()), | |
| 12 | 11 | 'Bool16x8 [ false, false, false, false, false, false, false, false ]'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments