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

Side by Side Diff: test/cctest/parsing/test-parse-decision.cc

Issue 2622503002: include fixing: api.h shouldn't include objects-inl.h (Closed)
Patch Set: static type check Created 3 years, 11 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
« no previous file with comments | « test/cctest/interpreter/test-source-positions.cc ('k') | test/cctest/parsing/test-scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Test specific cases of the lazy/eager-parse decision. 5 // Test specific cases of the lazy/eager-parse decision.
6 // 6 //
7 // Note that presently most unit tests for parsing are found in 7 // Note that presently most unit tests for parsing are found in
8 // cctest/test-parsing.cc. 8 // cctest/test-parsing.cc.
9 9
10 #include <unordered_map> 10 #include <unordered_map>
11 11
12 #include "include/v8.h" 12 #include "include/v8.h"
13 #include "src/api.h" 13 #include "src/api.h"
14 #include "src/handles-inl.h" 14 #include "src/handles-inl.h"
15 #include "src/isolate.h" 15 #include "src/isolate.h"
16 #include "src/objects-inl.h"
16 #include "src/utils.h" 17 #include "src/utils.h"
17 18
18 #include "test/cctest/cctest.h" 19 #include "test/cctest/cctest.h"
19 20
20 using namespace v8::internal; 21 using namespace v8::internal;
21 22
22 namespace { 23 namespace {
23 24
24 // Record the 'compiled' state of all top level functions. 25 // Record the 'compiled' state of all top level functions.
25 void GetTopLevelFunctionInfo( 26 void GetTopLevelFunctionInfo(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 LocalContext env; 98 LocalContext env;
98 99
99 const char src[] = "!function a(){}(),function b(){}(),function c(){}();"; 100 const char src[] = "!function a(){}(),function b(){}(),function c(){}();";
100 std::unordered_map<std::string, bool> is_compiled; 101 std::unordered_map<std::string, bool> is_compiled;
101 GetTopLevelFunctionInfo(v8_compile(src), &is_compiled); 102 GetTopLevelFunctionInfo(v8_compile(src), &is_compiled);
102 103
103 DCHECK(is_compiled["a"]); 104 DCHECK(is_compiled["a"]);
104 DCHECK(is_compiled["b"]); 105 DCHECK(is_compiled["b"]);
105 DCHECK(is_compiled["c"]); 106 DCHECK(is_compiled["c"]);
106 } 107 }
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-source-positions.cc ('k') | test/cctest/parsing/test-scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698