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

Side by Side Diff: src/scanner-base.cc

Issue 7671016: Initialize harmony block scoping field in scanner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return x; 68 return x;
69 } 69 }
70 70
71 71
72 72
73 // ---------------------------------------------------------------------------- 73 // ----------------------------------------------------------------------------
74 // JavaScriptScanner 74 // JavaScriptScanner
75 75
76 JavaScriptScanner::JavaScriptScanner(UnicodeCache* scanner_contants) 76 JavaScriptScanner::JavaScriptScanner(UnicodeCache* scanner_contants)
77 : Scanner(scanner_contants), 77 : Scanner(scanner_contants),
78 octal_pos_(Location::invalid()) { } 78 octal_pos_(Location::invalid()),
79 harmony_block_scoping_(false) { }
79 80
80 81
81 void JavaScriptScanner::Initialize(UC16CharacterStream* source) { 82 void JavaScriptScanner::Initialize(UC16CharacterStream* source) {
82 source_ = source; 83 source_ = source;
83 // Need to capture identifiers in order to recognize "get" and "set" 84 // Need to capture identifiers in order to recognize "get" and "set"
84 // in object literals. 85 // in object literals.
85 Init(); 86 Init();
86 // Skip initial whitespace allowing HTML comment ends just like 87 // Skip initial whitespace allowing HTML comment ends just like
87 // after a newline and scan first token. 88 // after a newline and scan first token.
88 has_line_terminator_before_next_ = true; 89 has_line_terminator_before_next_ = true;
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } 1040 }
1040 AddLiteralCharAdvance(); 1041 AddLiteralCharAdvance();
1041 } 1042 }
1042 literal.Complete(); 1043 literal.Complete();
1043 1044
1044 next_.location.end_pos = source_pos() - 1; 1045 next_.location.end_pos = source_pos() - 1;
1045 return true; 1046 return true;
1046 } 1047 }
1047 1048
1048 } } // namespace v8::internal 1049 } } // namespace v8::internal
OLDNEW
« 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