Title: [222120] trunk/Tools
Revision
222120
Author
[email protected]
Date
2017-09-15 17:02:48 -0700 (Fri, 15 Sep 2017)

Log Message

[WSL] Small cleanup in Evaluator
https://bugs.webkit.org/show_bug.cgi?id=176971

Reviewed by Filip Pizlo.

Use the symbols for break and continue instead of the objects themselves.

No tests because there is no behavior change.

* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitWhileLoop):
(Evaluator.prototype.visitDoWhileLoop):
(Evaluator.prototype.visitForLoop):
(Evaluator.prototype.visitBreak):
(Evaluator.prototype.visitContinue):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222119 => 222120)


--- trunk/Tools/ChangeLog	2017-09-15 23:59:35 UTC (rev 222119)
+++ trunk/Tools/ChangeLog	2017-09-16 00:02:48 UTC (rev 222120)
@@ -1,3 +1,21 @@
+2017-09-15  Myles C. Maxfield  <[email protected]>
+
+        [WSL] Small cleanup in Evaluator
+        https://bugs.webkit.org/show_bug.cgi?id=176971
+
+        Reviewed by Filip Pizlo.
+
+        Use the symbols for break and continue instead of the objects themselves.
+
+        No tests because there is no behavior change.
+
+        * WebGPUShadingLanguageRI/Evaluator.js:
+        (Evaluator.prototype.visitWhileLoop):
+        (Evaluator.prototype.visitDoWhileLoop):
+        (Evaluator.prototype.visitForLoop):
+        (Evaluator.prototype.visitBreak):
+        (Evaluator.prototype.visitContinue):
+
 2017-09-15  Filip Pizlo  <[email protected]>
 
         WSL Evaluator should only allocate EBuffers when dealing with intrinsics

Modified: trunk/Tools/WebGPUShadingLanguageRI/Evaluator.js (222119 => 222120)


--- trunk/Tools/WebGPUShadingLanguageRI/Evaluator.js	2017-09-15 23:59:35 UTC (rev 222119)
+++ trunk/Tools/WebGPUShadingLanguageRI/Evaluator.js	2017-09-16 00:02:48 UTC (rev 222120)
@@ -180,9 +180,9 @@
             try {
                 node.body.visit(this);
             } catch (e) {
-                if (e instanceof Break)
+                if (e == BreakException)
                     break;
-                if (e instanceof Continue)
+                if (e == ContinueException)
                     continue;
                 throw e;
             }
@@ -195,9 +195,9 @@
             try {
                 node.body.visit(this);
             } catch (e) {
-                if (e instanceof Break)
+                if (e == BreakException)
                     break;
-                if (e instanceof Continue)
+                if (e == ContinueException)
                     continue;
                 throw e;
             }
@@ -212,9 +212,9 @@
             try {
                 node.body.visit(this);
             } catch (e) {
-                if (e instanceof Break)
+                if (e == BreakException)
                     break;
-                if (e instanceof Continue)
+                if (e == ContinueException)
                     continue;
                 throw e;
             }
@@ -223,12 +223,12 @@
 
     visitBreak(node)
     {
-        throw node;
+        throw BreakException;
     }
 
     visitContinue(node)
     {
-        throw node;
+        throw ContinueException;
     }
     
     visitLetExpression(node)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to