OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-expression-visitor.h" | 8 #include "src/ast/ast-expression-visitor.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/parsing/parser.h" | 10 #include "src/parsing/parser.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 info.set_lazy(false); | 65 info.set_lazy(false); |
66 info.set_allow_lazy_parsing(false); | 66 info.set_allow_lazy_parsing(false); |
67 info.set_toplevel(true); | 67 info.set_toplevel(true); |
68 | 68 |
69 CHECK(i::Compiler::ParseAndAnalyze(&info)); | 69 CHECK(i::Compiler::ParseAndAnalyze(&info)); |
70 | 70 |
71 FunctionLiteral* root = | 71 FunctionLiteral* root = |
72 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); | 72 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); |
73 AsmTyper typer(isolate, zone, *script, root); | 73 AsmTyper typer(isolate, zone, *script, root); |
74 if (typer.Validate()) { | 74 if (typer.Validate()) { |
75 ExpressionTypeCollector(isolate, root, types).Run(); | 75 ExpressionTypeCollector(isolate, root, typer.bounds(), types).Run(); |
76 return ""; | 76 return ""; |
77 } else { | 77 } else { |
78 return typer.error_message(); | 78 return typer.error_message(); |
79 } | 79 } |
80 } | 80 } |
81 | 81 |
82 } // namespace | 82 } // namespace |
83 | 83 |
84 | 84 |
85 TEST(ValidateMinimum) { | 85 TEST(ValidateMinimum) { |
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { | 2504 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
2505 CHECK_VAR(x, Bounds(cache.kAsmDouble)); | 2505 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
2506 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); | 2506 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
2507 } | 2507 } |
2508 } | 2508 } |
2509 } | 2509 } |
2510 CHECK_SKIP(); | 2510 CHECK_SKIP(); |
2511 } | 2511 } |
2512 CHECK_FUNC_TYPES_END | 2512 CHECK_FUNC_TYPES_END |
2513 } | 2513 } |
OLD | NEW |