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

Side by Side Diff: src/preparser.cc

Issue 8226017: Introduce collective --harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 | « src/preparser.h ('k') | src/scanner.h » ('j') | src/v8.cc » ('J')
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 PreParser::Statement PreParser::ParseBlock(bool* ok) { 287 PreParser::Statement PreParser::ParseBlock(bool* ok) {
288 // Block :: 288 // Block ::
289 // '{' Statement* '}' 289 // '{' Statement* '}'
290 290
291 // Note that a Block does not introduce a new execution scope! 291 // Note that a Block does not introduce a new execution scope!
292 // (ECMA-262, 3rd, 12.2) 292 // (ECMA-262, 3rd, 12.2)
293 // 293 //
294 Expect(i::Token::LBRACE, CHECK_OK); 294 Expect(i::Token::LBRACE, CHECK_OK);
295 while (peek() != i::Token::RBRACE) { 295 while (peek() != i::Token::RBRACE) {
296 if (harmony_block_scoping_) { 296 if (harmony_scoping_) {
297 ParseSourceElement(CHECK_OK); 297 ParseSourceElement(CHECK_OK);
298 } else { 298 } else {
299 ParseStatement(CHECK_OK); 299 ParseStatement(CHECK_OK);
300 } 300 }
301 } 301 }
302 Expect(i::Token::RBRACE, ok); 302 Expect(i::Token::RBRACE, ok);
303 return Statement::Default(); 303 return Statement::Default();
304 } 304 }
305 305
306 306
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 backing_store_.Add(static_cast<byte>((ascii_length >> 14) | 0x80u)); 1680 backing_store_.Add(static_cast<byte>((ascii_length >> 14) | 0x80u));
1681 } 1681 }
1682 backing_store_.Add(static_cast<byte>((ascii_length >> 7) | 0x80u)); 1682 backing_store_.Add(static_cast<byte>((ascii_length >> 7) | 0x80u));
1683 } 1683 }
1684 backing_store_.Add(static_cast<byte>(ascii_length & 0x7f)); 1684 backing_store_.Add(static_cast<byte>(ascii_length & 0x7f));
1685 1685
1686 backing_store_.AddBlock(bytes); 1686 backing_store_.AddBlock(bytes);
1687 return backing_store_.EndSequence().start(); 1687 return backing_store_.EndSequence().start();
1688 } 1688 }
1689 } } // v8::preparser 1689 } } // v8::preparser
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/scanner.h » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698