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

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

Issue 2212383003: Revert of Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/ast.h » ('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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 436
437 void VisitForOfStatement(ForOfStatement* stmt) { UNREACHABLE(); } 437 void VisitForOfStatement(ForOfStatement* stmt) { UNREACHABLE(); }
438 438
439 void VisitTryCatchStatement(TryCatchStatement* stmt) { UNREACHABLE(); } 439 void VisitTryCatchStatement(TryCatchStatement* stmt) { UNREACHABLE(); }
440 440
441 void VisitTryFinallyStatement(TryFinallyStatement* stmt) { UNREACHABLE(); } 441 void VisitTryFinallyStatement(TryFinallyStatement* stmt) { UNREACHABLE(); }
442 442
443 void VisitDebuggerStatement(DebuggerStatement* stmt) { UNREACHABLE(); } 443 void VisitDebuggerStatement(DebuggerStatement* stmt) { UNREACHABLE(); }
444 444
445 void VisitFunctionLiteral(FunctionLiteral* expr) { 445 void VisitFunctionLiteral(FunctionLiteral* expr) {
446 DeclarationScope* scope = expr->scope(); 446 Scope* scope = expr->scope();
447 if (scope_ == kFuncScope) { 447 if (scope_ == kFuncScope) {
448 if (auto* func_type = typer_->TypeOf(expr)->AsFunctionType()) { 448 if (auto* func_type = typer_->TypeOf(expr)->AsFunctionType()) {
449 // Build the signature for the function. 449 // Build the signature for the function.
450 LocalType return_type = TypeFrom(func_type->ReturnType()); 450 LocalType return_type = TypeFrom(func_type->ReturnType());
451 const auto& arguments = func_type->Arguments(); 451 const auto& arguments = func_type->Arguments();
452 FunctionSig::Builder b(zone(), return_type == kAstStmt ? 0 : 1, 452 FunctionSig::Builder b(zone(), return_type == kAstStmt ? 0 : 1,
453 arguments.size()); 453 arguments.size());
454 if (return_type != kAstStmt) b.AddReturn(return_type); 454 if (return_type != kAstStmt) b.AddReturn(return_type);
455 for (int i = 0; i < expr->parameter_count(); ++i) { 455 for (int i = 0; i < expr->parameter_count(); ++i) {
456 LocalType type = TypeFrom(arguments[i]); 456 LocalType type = TypeFrom(arguments[i]);
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_); 1782 AsmWasmBuilderImpl impl(isolate_, zone_, literal_, typer_);
1783 impl.Build(); 1783 impl.Build();
1784 *foreign_args = impl.GetForeignArgs(); 1784 *foreign_args = impl.GetForeignArgs();
1785 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_); 1785 ZoneBuffer* buffer = new (zone_) ZoneBuffer(zone_);
1786 impl.builder_->WriteTo(*buffer); 1786 impl.builder_->WriteTo(*buffer);
1787 return buffer; 1787 return buffer;
1788 } 1788 }
1789 } // namespace wasm 1789 } // namespace wasm
1790 } // namespace internal 1790 } // namespace internal
1791 } // namespace v8 1791 } // namespace v8
OLDNEW
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698