Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: src/asmjs/asm-wasm-builder.cc

Issue 2233673003: Remove CONST_LEGACY VariableMode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/ast/scopeinfo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/ast/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698