Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: test/lexer/cornercases/utf-endlines.js

Issue 82733006: Experimental parser: add a test file for unicode newlines. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/lexer/cornercases/utf-endlines.js
diff --git a/src/hydrogen-check-elimination.h b/test/lexer/cornercases/utf-endlines.js
similarity index 68%
copy from src/hydrogen-check-elimination.h
copy to test/lexer/cornercases/utf-endlines.js
index fa01964f6faf091c3f2504b6d2cfe416e0a09b16..8ac1ee2fa895d691403ed0f6865a7dfd312b9a8c 100644
--- a/src/hydrogen-check-elimination.h
+++ b/test/lexer/cornercases/utf-endlines.js
@@ -25,28 +25,31 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_CHECK_ELIMINATION_H_
-#define V8_HYDROGEN_CHECK_ELIMINATION_H_
+// The "-->" at the beginning of a line is a weird SpiderMonkey compatibility
+// hack.
-#include "hydrogen.h"
+// This file tests if it's recognized after various Unicode new line markers:
-namespace v8 {
-namespace internal {
+"Line feed":
+--> break
+// Vertical tab is not recognized as a newline.
+"Vertical tab": --> case
-// Remove CheckMaps instructions through flow- and branch-sensitive analysis.
-class HCheckEliminationPhase : public HPhase {
- public:
- explicit HCheckEliminationPhase(HGraph* graph)
- : HPhase("H_Check Elimination", graph) { }
+// Form feed is not recognized as a newline.
+"Form feed": --> catch
- void Run();
+"Carriage return":
--> const
- private:
- void EliminateLocalChecks(HBasicBlock* block);
-};
+"Carriage return and line feed:"
+--> continue
+// Next line is not regonized as a newline, instead it's recognized as an identifier.
+"Next line":…
+--> debugger
-} } // namespace v8::internal
+// Line separator is not recognized as a newline, instead it's ILLEGAL.
+//"Line separator":
--> default
-#endif // V8_HYDROGEN_CHECK_ELIMINATION_H_
+// Paragraph separator is not recognized as a newline, instead it's ILLEGAL.
+//"Paragraph separator":
--> delete
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698