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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 current_function_builder_ = builder_->FunctionAt(index); | 130 current_function_builder_ = builder_->FunctionAt(index); |
131 scope_ = kFuncScope; | 131 scope_ = kFuncScope; |
132 RECURSE(Visit(decl->fun())); | 132 RECURSE(Visit(decl->fun())); |
133 scope_ = kModuleScope; | 133 scope_ = kModuleScope; |
134 current_function_builder_ = nullptr; | 134 current_function_builder_ = nullptr; |
135 local_variables_.Clear(); | 135 local_variables_.Clear(); |
136 } | 136 } |
137 | 137 |
138 void VisitImportDeclaration(ImportDeclaration* decl) override {} | 138 void VisitImportDeclaration(ImportDeclaration* decl) override {} |
139 | 139 |
140 void VisitExportDeclaration(ExportDeclaration* decl) override {} | |
141 | |
142 void VisitStatements(ZoneList<Statement*>* stmts) override { | 140 void VisitStatements(ZoneList<Statement*>* stmts) override { |
143 for (int i = 0; i < stmts->length(); ++i) { | 141 for (int i = 0; i < stmts->length(); ++i) { |
144 Statement* stmt = stmts->at(i); | 142 Statement* stmt = stmts->at(i); |
145 ExpressionStatement* e = stmt->AsExpressionStatement(); | 143 ExpressionStatement* e = stmt->AsExpressionStatement(); |
146 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { | 144 if (e != nullptr && e->expression()->IsUndefinedLiteral()) { |
147 continue; | 145 continue; |
148 } | 146 } |
149 RECURSE(Visit(stmt)); | 147 RECURSE(Visit(stmt)); |
150 if (stmt->IsJump()) break; | 148 if (stmt->IsJump()) break; |
151 } | 149 } |
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); | 1776 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); |
1779 impl.Build(); | 1777 impl.Build(); |
1780 *foreign_args = impl.GetForeignArgs(); | 1778 *foreign_args = impl.GetForeignArgs(); |
1781 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); | 1779 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); |
1782 impl.builder_->WriteTo(*buffer); | 1780 impl.builder_->WriteTo(*buffer); |
1783 return buffer; | 1781 return buffer; |
1784 } | 1782 } |
1785 } // namespace wasm | 1783 } // namespace wasm |
1786 } // namespace internal | 1784 } // namespace internal |
1787 } // namespace v8 | 1785 } // namespace v8 |
OLD | NEW |