| 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 // Required to get M_E etc. in MSVC. | 7 // Required to get M_E etc. in MSVC. |
| 8 #if defined(_WIN32) | 8 #if defined(_WIN32) |
| 9 #define _USE_MATH_DEFINES | 9 #define _USE_MATH_DEFINES |
| 10 #endif | 10 #endif |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 DCHECK_NULL(current_function_builder_); | 126 DCHECK_NULL(current_function_builder_); |
| 127 uint32_t index = LookupOrInsertFunction(decl->proxy()->var()); | 127 uint32_t index = LookupOrInsertFunction(decl->proxy()->var()); |
| 128 current_function_builder_ = builder_->FunctionAt(index); | 128 current_function_builder_ = builder_->FunctionAt(index); |
| 129 scope_ = kFuncScope; | 129 scope_ = kFuncScope; |
| 130 RECURSE(Visit(decl->fun())); | 130 RECURSE(Visit(decl->fun())); |
| 131 scope_ = kModuleScope; | 131 scope_ = kModuleScope; |
| 132 current_function_builder_ = nullptr; | 132 current_function_builder_ = nullptr; |
| 133 local_variables_.Clear(); | 133 local_variables_.Clear(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void VisitImportDeclaration(ImportDeclaration* decl) {} | |
| 137 | |
| 138 void VisitStatements(ZoneList<Statement*>* stmts) { | 136 void VisitStatements(ZoneList<Statement*>* stmts) { |
| 139 for (int i = 0; i < stmts->length(); ++i) { | 137 for (int i = 0; i < stmts->length(); ++i) { |
| 140 Statement* stmt = stmts->at(i); | 138 Statement* stmt = stmts->at(i); |
| 141 ExpressionStatement* e = stmt->AsExpressionStatement(); | 139 ExpressionStatement* e = stmt->AsExpressionStatement(); |
| 142 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { | 140 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { |
| 143 continue; | 141 continue; |
| 144 } | 142 } |
| 145 RECURSE(Visit(stmt)); | 143 RECURSE(Visit(stmt)); |
| 146 if (stmt->IsJump()) break; | 144 if (stmt->IsJump()) break; |
| 147 } | 145 } |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1779 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); | 1777 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); |
| 1780 impl.Build(); | 1778 impl.Build(); |
| 1781 *foreign_args = impl.GetForeignArgs(); | 1779 *foreign_args = impl.GetForeignArgs(); |
| 1782 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); | 1780 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); |
| 1783 impl.builder_->WriteTo(*buffer); | 1781 impl.builder_->WriteTo(*buffer); |
| 1784 return buffer; | 1782 return buffer; |
| 1785 } | 1783 } |
| 1786 } // namespace wasm | 1784 } // namespace wasm |
| 1787 } // namespace internal | 1785 } // namespace internal |
| 1788 } // namespace v8 | 1786 } // namespace v8 |
| OLD | NEW |