OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 30 matching lines...) Expand all Loading... |
41 #include "src/flags.h" | 41 #include "src/flags.h" |
42 #include "src/isolate.h" | 42 #include "src/isolate.h" |
43 #include "src/objects.h" | 43 #include "src/objects.h" |
44 #include "src/parsing/parse-info.h" | 44 #include "src/parsing/parse-info.h" |
45 #include "src/parsing/parser.h" | 45 #include "src/parsing/parser.h" |
46 #include "src/parsing/parsing.h" | 46 #include "src/parsing/parsing.h" |
47 #include "src/parsing/preparser.h" | 47 #include "src/parsing/preparser.h" |
48 #include "src/parsing/rewriter.h" | 48 #include "src/parsing/rewriter.h" |
49 #include "src/parsing/scanner-character-streams.h" | 49 #include "src/parsing/scanner-character-streams.h" |
50 #include "src/parsing/token.h" | 50 #include "src/parsing/token.h" |
| 51 #include "src/unicode-cache.h" |
51 #include "src/utils.h" | 52 #include "src/utils.h" |
52 | 53 |
53 #include "test/cctest/cctest.h" | 54 #include "test/cctest/cctest.h" |
54 | 55 |
55 TEST(ScanKeywords) { | 56 TEST(ScanKeywords) { |
56 struct KeywordToken { | 57 struct KeywordToken { |
57 const char* keyword; | 58 const char* keyword; |
58 i::Token::Value token; | 59 i::Token::Value token; |
59 }; | 60 }; |
60 | 61 |
(...skipping 8634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8695 DCHECK_NOT_NULL(scope); | 8696 DCHECK_NOT_NULL(scope); |
8696 DCHECK_NULL(scope->sibling()); | 8697 DCHECK_NULL(scope->sibling()); |
8697 DCHECK(scope->is_function_scope()); | 8698 DCHECK(scope->is_function_scope()); |
8698 const i::AstRawString* var_name = | 8699 const i::AstRawString* var_name = |
8699 info.ast_value_factory()->GetOneByteString("my_var"); | 8700 info.ast_value_factory()->GetOneByteString("my_var"); |
8700 i::Variable* var = scope->Lookup(var_name); | 8701 i::Variable* var = scope->Lookup(var_name); |
8701 CHECK_EQ(inners[i].ctxt_allocate, | 8702 CHECK_EQ(inners[i].ctxt_allocate, |
8702 i::ScopeTestHelper::MustAllocateInContext(var)); | 8703 i::ScopeTestHelper::MustAllocateInContext(var)); |
8703 } | 8704 } |
8704 } | 8705 } |
OLD | NEW |