Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gsoc'24): updates and bug fixes from the main simulator #314

Closed

Conversation

niladrix719
Copy link
Member

@niladrix719 niladrix719 commented May 16, 2024

Updates and Bug fixes from the main Simulator

Copy link

netlify bot commented May 16, 2024

Deploy Preview for circuitverse ready!

Name Link
🔨 Latest commit de610eb
🔍 Latest deploy log https://app.netlify.com/sites/circuitverse/deploys/66a9b333f8c3450008b9b8da
😎 Deploy Preview https://deploy-preview-314--circuitverse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/simulator/src/tutorials.js Outdated Show resolved Hide resolved
src/simulator/src/node.js Fixed Show fixed Hide fixed
simulationArea.simulationQueue.add(this.parent)
}
// For input nodes, resolve its parents if they are resolvable at this point.
if (this.type == NODE_INPUT) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INPUT' is not defined.
src/simulator/src/node.js Fixed Show fixed Hide fixed
switch (node.type) {
// TODO: For an output node, a downstream value (value given by elements other than the parent)
// should be overwritten in contention check and should not cause contention.
case NODE_OUTPUT:

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_OUTPUT' is not defined.
)
}
// Fallthrough. NODE_OUTPUT propagates like a contention checked NODE_INPUT
case NODE_INPUT:

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INPUT' is not defined.
break;
}
// Fallthrough. NODE_INPUT propagates like a bitwidth checked NODE_INTERMEDIATE
case NODE_INTERMEDIATE:

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
src/simulator/src/node.js Fixed Show fixed Hide fixed
@@ -162,7 +163,7 @@
this.id = `node${uniqueIdCounter}`
uniqueIdCounter++
this.parent = parent
if (type != 2 && this.parent.nodeList !== undefined) {
if (type != NODE_INTERMEDIATE && this.parent.nodeList !== undefined) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -201,7 +202,7 @@
// This fn is called during rotations and setup
this.refresh()

if (this.type == 2) {
if (this.type == NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -226,7 +227,7 @@
* function to convert a node to intermediate node
*/
converToIntermediate() {
this.type = 2
this.type = NODE_INTERMEDIATE

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
*/
saveObject() {
if (this.type == 2) {
if (this.type == NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -312,7 +313,7 @@
*/
updateScope(scope) {
this.scope = scope
if (this.type == 2) this.parent = scope.root
if (this.type == NODE_INTERMEDIATE) this.parent = scope.root

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -670,7 +686,7 @@
if (!this.wasClicked && this.clicked) {
this.wasClicked = true
this.prev = 'a'
if (this.type == 2) {
if (this.type == NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -712,7 +728,7 @@
simulationArea.multipleObjectSelections[i].drag()
}
}
if (this.type == 2) {
if (this.type == NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -881,7 +897,7 @@
simulationArea.lastSelected = n2
}

if (this.type == 2 && simulationArea.mouseDown == false) {
if (this.type == NODE_INTERMEDIATE && simulationArea.mouseDown == false) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -947,7 +963,7 @@
y == this.parent.scope.allNodes[i].absY()
) {
n = this.parent.scope.allNodes[i]
if (this.type == 2) {
if (this.type == NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@@ -964,7 +980,7 @@
for (var i = 0; i < this.parent.scope.wires.length; i++) {
if (this.parent.scope.wires[i].checkConvergence(this)) {
var n = this
if (this.type != 2) {
if (this.type != NODE_INTERMEDIATE) {

Check failure

Code scanning / ESLint

disallow the use of undeclared variables unless mentioned in `/*global */` comments Error

'NODE_INTERMEDIATE' is not defined.
@niladrix719 niladrix719 marked this pull request as ready for review June 1, 2024 15:36
@niladrix719 niladrix719 added the GSOC'24 PR's for GSoC'24 label Jul 25, 2024
@tachyons
Copy link
Member

tachyons commented Jul 31, 2024

@niladrix719 I think this will undo some of the optimizations made by @JoshVarga . Why was this PR delayed ? you mentioned that all the updates from the legacy simulator are already copied, right ?

@tachyons tachyons requested a review from JoshVarga July 31, 2024 10:30
@niladrix719
Copy link
Member Author

@tachyons , I guess there was some miscommunication on my end. The PR was there way back but wasn't merged before

@tachyons
Copy link
Member

@niladrix719 Could you create separate PRs to copy changes. PR can't be reviewed in this form. Also give highest priority for this.

@tachyons tachyons closed this Jul 31, 2024
@niladrix719
Copy link
Member Author

niladrix719 commented Aug 1, 2024

created Separate PRs - #345, #346, #347, #348, #349, #350, #351, #352, #353, #354, #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSOC'24 PR's for GSoC'24
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants