OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |