| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 i::Isolate* isolate = CcTest::i_isolate(); | 54 i::Isolate* isolate = CcTest::i_isolate(); |
| 55 i::Factory* factory = isolate->factory(); | 55 i::Factory* factory = isolate->factory(); |
| 56 | 56 |
| 57 i::Handle<i::String> source_code = | 57 i::Handle<i::String> source_code = |
| 58 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked(); | 58 factory->NewStringFromUtf8(i::CStrVector(source)).ToHandleChecked(); |
| 59 | 59 |
| 60 i::Handle<i::Script> script = factory->NewScript(source_code); | 60 i::Handle<i::Script> script = factory->NewScript(source_code); |
| 61 | 61 |
| 62 i::ParseInfo info(zone, script); | 62 i::ParseInfo info(zone, script); |
| 63 i::Parser parser(&info); | 63 i::Parser parser(&info); |
| 64 parser.set_allow_harmony_sloppy(true); | |
| 65 info.set_global(); | 64 info.set_global(); |
| 66 info.set_lazy(false); | 65 info.set_lazy(false); |
| 67 info.set_allow_lazy_parsing(false); | 66 info.set_allow_lazy_parsing(false); |
| 68 info.set_toplevel(true); | 67 info.set_toplevel(true); |
| 69 | 68 |
| 70 CHECK(i::Compiler::ParseAndAnalyze(&info)); | 69 CHECK(i::Compiler::ParseAndAnalyze(&info)); |
| 71 | 70 |
| 72 FunctionLiteral* root = | 71 FunctionLiteral* root = |
| 73 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); | 72 info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); |
| 74 AsmTyper typer(isolate, zone, *script, root); | 73 AsmTyper typer(isolate, zone, *script, root); |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { | 2504 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmDouble)) { |
| 2506 CHECK_VAR(x, Bounds(cache.kAsmDouble)); | 2505 CHECK_VAR(x, Bounds(cache.kAsmDouble)); |
| 2507 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); | 2506 CHECK_EXPR(Literal, Bounds(cache.kAsmDouble)); |
| 2508 } | 2507 } |
| 2509 } | 2508 } |
| 2510 } | 2509 } |
| 2511 CHECK_SKIP(); | 2510 CHECK_SKIP(); |
| 2512 } | 2511 } |
| 2513 CHECK_FUNC_TYPES_END | 2512 CHECK_FUNC_TYPES_END |
| 2514 } | 2513 } |
| OLD | NEW |