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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 namespace std { | 46 namespace std { |
47 | 47 |
48 // Usually defined in math.h, but not in MSVC until VS2013+. | 48 // Usually defined in math.h, but not in MSVC until VS2013+. |
49 // Abstracted to work | 49 // Abstracted to work |
50 int isfinite(double value); | 50 int isfinite(double value); |
51 | 51 |
52 } // namespace std | 52 } // namespace std |
53 #endif | 53 #endif |
54 | 54 |
55 namespace v8 { | 55 namespace v8 { |
56 | 56 namespace internal { |
57 namespace preparser { | |
58 | 57 |
59 PreParser::PreParseResult PreParser::PreParseLazyFunction( | 58 PreParser::PreParseResult PreParser::PreParseLazyFunction( |
60 i::LanguageMode mode, bool is_generator, i::ParserRecorder* log) { | 59 i::LanguageMode mode, bool is_generator, i::ParserRecorder* log) { |
61 log_ = log; | 60 log_ = log; |
62 // Lazy functions always have trivial outer scopes (no with/catch scopes). | 61 // Lazy functions always have trivial outer scopes (no with/catch scopes). |
63 Scope top_scope(&scope_, kTopLevelScope); | 62 Scope top_scope(&scope_, kTopLevelScope); |
64 set_language_mode(mode); | 63 set_language_mode(mode); |
65 Scope function_scope(&scope_, kFunctionScope); | 64 Scope function_scope(&scope_, kFunctionScope); |
66 function_scope.set_is_generator(is_generator); | 65 function_scope.set_is_generator(is_generator); |
67 ASSERT_EQ(i::Token::LBRACE, scanner_->current_token()); | 66 ASSERT_EQ(i::Token::LBRACE, scanner_->current_token()); |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 | 1655 |
1657 | 1656 |
1658 bool PreParser::peek_any_identifier() { | 1657 bool PreParser::peek_any_identifier() { |
1659 i::Token::Value next = peek(); | 1658 i::Token::Value next = peek(); |
1660 return next == i::Token::IDENTIFIER || | 1659 return next == i::Token::IDENTIFIER || |
1661 next == i::Token::FUTURE_RESERVED_WORD || | 1660 next == i::Token::FUTURE_RESERVED_WORD || |
1662 next == i::Token::FUTURE_STRICT_RESERVED_WORD || | 1661 next == i::Token::FUTURE_STRICT_RESERVED_WORD || |
1663 next == i::Token::YIELD; | 1662 next == i::Token::YIELD; |
1664 } | 1663 } |
1665 | 1664 |
1666 } } // v8::preparser | 1665 } } // v8::internal |
OLD | NEW |