| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/ast-expression-visitor.h" | 10 #include "src/ast-expression-visitor.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 i::Isolate* isolate = CcTest::i_isolate(); | 24 i::Isolate* isolate = CcTest::i_isolate(); |
| 25 i::Factory* factory = isolate->factory(); | 25 i::Factory* factory = isolate->factory(); |
| 26 | 26 |
| 27 i::Handle<i::String> source_code = | 27 i::Handle<i::String> source_code = |
| 28 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked(); | 28 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked(); |
| 29 | 29 |
| 30 i::Handle<i::Script> script = factory->NewScript(source_code); | 30 i::Handle<i::Script> script = factory->NewScript(source_code); |
| 31 | 31 |
| 32 i::ParseInfo info(handles->main_zone(), script); | 32 i::ParseInfo info(handles->main_zone(), script); |
| 33 i::Parser parser(&info); | 33 i::Parser parser(&info); |
| 34 parser.set_allow_harmony_arrow_functions(true); | |
| 35 parser.set_allow_harmony_sloppy(true); | 34 parser.set_allow_harmony_sloppy(true); |
| 36 info.set_global(); | 35 info.set_global(); |
| 37 info.set_lazy(false); | 36 info.set_lazy(false); |
| 38 info.set_allow_lazy_parsing(false); | 37 info.set_allow_lazy_parsing(false); |
| 39 info.set_toplevel(true); | 38 info.set_toplevel(true); |
| 40 | 39 |
| 41 CHECK(i::Compiler::ParseAndAnalyze(&info)); | 40 CHECK(i::Compiler::ParseAndAnalyze(&info)); |
| 42 | 41 |
| 43 ExpressionTypeCollector( | 42 ExpressionTypeCollector( |
| 44 isolate, handles->main_zone(), | 43 isolate, handles->main_zone(), |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) { | 383 CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) { |
| 385 CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) { | 384 CHECK_EXPR(BinaryOperation, Bounds::Unbounded()) { |
| 386 // Skip x + x | 385 // Skip x + x |
| 387 CHECK_SKIP(); | 386 CHECK_SKIP(); |
| 388 CHECK_EXPR(Literal, Bounds::Unbounded()); | 387 CHECK_EXPR(Literal, Bounds::Unbounded()); |
| 389 } | 388 } |
| 390 } | 389 } |
| 391 } | 390 } |
| 392 CHECK_TYPES_END | 391 CHECK_TYPES_END |
| 393 } | 392 } |
| OLD | NEW |