| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 UNREACHABLE(); // invalid assignment. | 826 UNREACHABLE(); // invalid assignment. |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 void VisitAssignment(Assignment* expr) { | 830 void VisitAssignment(Assignment* expr) { |
| 831 bool as_init = false; | 831 bool as_init = false; |
| 832 if (scope_ == kModuleScope) { | 832 if (scope_ == kModuleScope) { |
| 833 // Skip extra assignment inserted by the parser when in this form: | 833 // Skip extra assignment inserted by the parser when in this form: |
| 834 // (function Module(a, b, c) {... }) | 834 // (function Module(a, b, c) {... }) |
| 835 if (expr->target()->IsVariableProxy() && | 835 if (expr->target()->IsVariableProxy() && |
| 836 expr->target()->AsVariableProxy()->var()->mode() == CONST_LEGACY) { | 836 expr->target()->AsVariableProxy()->var()->is_sloppy_function_name()) { |
| 837 return; | 837 return; |
| 838 } | 838 } |
| 839 Property* prop = expr->value()->AsProperty(); | 839 Property* prop = expr->value()->AsProperty(); |
| 840 if (prop != nullptr) { | 840 if (prop != nullptr) { |
| 841 VariableProxy* vp = prop->obj()->AsVariableProxy(); | 841 VariableProxy* vp = prop->obj()->AsVariableProxy(); |
| 842 if (vp != nullptr && vp->var()->IsParameter() && | 842 if (vp != nullptr && vp->var()->IsParameter() && |
| 843 vp->var()->index() == 1) { | 843 vp->var()->index() == 1) { |
| 844 VariableProxy* target = expr->target()->AsVariableProxy(); | 844 VariableProxy* target = expr->target()->AsVariableProxy(); |
| 845 if (typer_->TypeOf(target)->AsFFIType() != nullptr) { | 845 if (typer_->TypeOf(target)->AsFFIType() != nullptr) { |
| 846 const AstRawString* name = | 846 const AstRawString* name = |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); | 1788 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); |
| 1789 impl.Build(); | 1789 impl.Build(); |
| 1790 *foreign_args = impl.GetForeignArgs(); | 1790 *foreign_args = impl.GetForeignArgs(); |
| 1791 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); | 1791 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); |
| 1792 impl.builder_->WriteTo(*buffer); | 1792 impl.builder_->WriteTo(*buffer); |
| 1793 return buffer; | 1793 return buffer; |
| 1794 } | 1794 } |
| 1795 } // namespace wasm | 1795 } // namespace wasm |
| 1796 } // namespace internal | 1796 } // namespace internal |
| 1797 } // namespace v8 | 1797 } // namespace v8 |
| OLD | NEW |