question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: unnecessary assignment using SIMPLE_OPTIMIZATIONS

See original GitHub issue

I have updated to the latest version v20180610 from the one I was using (v20170806) and I found the code below to add an unnecessary assignment on class constructors:

/**
 * @constructor
 * @struct
 * @param {number} x
 * @param {number} y
 */
function Character( x, y ) {
    this.m_x = x;
    this.m_y = y;
};
/**
 * @constructor
 * @struct
 * @param {number} x
 * @param {number} y
 */
function FroggerPlayer( x, y ) {
    this.m_character = null;
    this.m_character = new Character( x, y );
};

Previously this code was minified to:

function Character(a, b) {
	this.m_x = a;
	this.m_y = b
}
function FroggerPlayer(a, b) {
	this.m_character = new Character(a, b)
};

But now is minified to:

function Character(a, b) {
	this.m_x = a;
	this.m_y = b
}
function FroggerPlayer(a, b) {
	this.m_character = null;
	this.m_character = new Character(a, b)
};

The compilation flags are: --language_in ECMASCRIPT5_STRICT --compilation_level SIMPLE_OPTIMIZATIONS

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lauraharkercommented, Jul 6, 2018
0reactions
excommented, Oct 22, 2018

Closing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Non-Linear Regression & Linear Programming (bsad-lab08)
We start by creating a simple linear regression model. Next, we plot the points to visually inspect the data and unravel any potential ......
Read more >
C loop optimization help for final assignment (with compiler ...
So for my final assignment in my computer systems class, we need to optimize these for loops to be faster than the original....
Read more >
Symbolic Regression: The Forgotten Machine Learning Method
The goal of a regression model is very simple: take as input one or more numbers and output another number. There are many...
Read more >
Programming Data Mining Applications - Assignments
For this assignment you will experiment with various regression ... Load and preprocess the data using Pandas or Numpy and, if necessary, ...
Read more >
Simple Linear Regression Using Statgraphics
Using the results of a regression analysis when the assumptions are invalid may lead to serious errors! Prior to reporting the results of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found