mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-01-25 16:08:02 +00:00
Passed unit test.
This commit is contained in:
parent
076b43cb58
commit
2a736dc1c5
@ -5,7 +5,7 @@
|
||||
* GPU Accelerated JavaScript
|
||||
*
|
||||
* @version 1.6.0
|
||||
* @date Thu Aug 30 2018 18:28:28 GMT-0500 (Central Daylight Time)
|
||||
* @date Thu Aug 30 2018 20:41:08 GMT-0500 (Central Daylight Time)
|
||||
*
|
||||
* @license MIT
|
||||
* The MIT License
|
||||
|
||||
2
bin/gpu-core.min.js
vendored
2
bin/gpu-core.min.js
vendored
@ -5,7 +5,7 @@
|
||||
* GPU Accelerated JavaScript
|
||||
*
|
||||
* @version 1.6.0
|
||||
* @date Thu Aug 30 2018 18:28:28 GMT-0500 (Central Daylight Time)
|
||||
* @date Thu Aug 30 2018 20:41:08 GMT-0500 (Central Daylight Time)
|
||||
*
|
||||
* @license MIT
|
||||
* The MIT License
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* GPU Accelerated JavaScript
|
||||
*
|
||||
* @version 1.6.0
|
||||
* @date Thu Aug 30 2018 18:28:28 GMT-0500 (Central Daylight Time)
|
||||
* @date Thu Aug 30 2018 20:41:08 GMT-0500 (Central Daylight Time)
|
||||
*
|
||||
* @license MIT
|
||||
* The MIT License
|
||||
@ -586,7 +586,7 @@ module.exports = function (_BaseFunctionNode) {
|
||||
key: 'astMemberExpression',
|
||||
value: function astMemberExpression(mNode, retArr) {
|
||||
if (mNode.computed) {
|
||||
if (mNode.object.type === 'Identifier') {
|
||||
if (mNode.object.type === 'Identifier' || mNode.object.type === 'MemberExpression' && mNode.object.object.object && mNode.object.object.object.type === 'ThisExpression' && mNode.object.object.property.name === 'constants') {
|
||||
this.pushState('identifier');
|
||||
this.astGeneric(mNode.object, retArr);
|
||||
this.popState('identifier');
|
||||
|
||||
18
bin/gpu.min.js
vendored
18
bin/gpu.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/backend/cpu/function-node.js
vendored
4
dist/backend/cpu/function-node.js
vendored
@ -13,7 +13,7 @@ var utils = require('../../core/utils');
|
||||
|
||||
/**
|
||||
* @class CPUFunctionNode
|
||||
*
|
||||
*
|
||||
* @extends BaseFunctionNode#
|
||||
*
|
||||
* @desc [INTERNAL] Represents a single function, inside JS
|
||||
@ -881,7 +881,7 @@ module.exports = function (_BaseFunctionNode) {
|
||||
key: 'astMemberExpression',
|
||||
value: function astMemberExpression(mNode, retArr) {
|
||||
if (mNode.computed) {
|
||||
if (mNode.object.type === 'Identifier') {
|
||||
if (mNode.object.type === 'Identifier' || mNode.object.type === 'MemberExpression' && mNode.object.object.object && mNode.object.object.object.type === 'ThisExpression' && mNode.object.object.property.name === 'constants') {
|
||||
this.pushState('identifier');
|
||||
this.astGeneric(mNode.object, retArr);
|
||||
this.popState('identifier');
|
||||
|
||||
@ -5,7 +5,7 @@ const utils = require('../../core/utils');
|
||||
|
||||
/**
|
||||
* @class CPUFunctionNode
|
||||
*
|
||||
*
|
||||
* @extends BaseFunctionNode#
|
||||
*
|
||||
* @desc [INTERNAL] Represents a single function, inside JS
|
||||
@ -816,7 +816,13 @@ module.exports = class CPUFunctionNode extends BaseFunctionNode {
|
||||
*/
|
||||
astMemberExpression(mNode, retArr) {
|
||||
if (mNode.computed) {
|
||||
if (mNode.object.type === 'Identifier') {
|
||||
if (mNode.object.type === 'Identifier' ||
|
||||
(
|
||||
mNode.object.type === 'MemberExpression' &&
|
||||
mNode.object.object.object &&
|
||||
mNode.object.object.object.type === 'ThisExpression' &&
|
||||
mNode.object.object.property.name === 'constants'
|
||||
)) {
|
||||
this.pushState('identifier');
|
||||
this.astGeneric(mNode.object, retArr);
|
||||
this.popState('identifier');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user