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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2533283002: [fullcodegen] Remove with-statement support. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index 143be8173e89d050b6b5bacab21e069597fc318a..4da840d67e932e0a2288344ee996b6fd618ebd1d 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -1114,33 +1114,8 @@ void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) {
- Comment cmnt(masm_, "[ WithStatement");
- SetStatementPosition(stmt);
-
- VisitForAccumulatorValue(stmt->expression());
- Callable callable = CodeFactory::ToObject(isolate());
- __ Move(callable.descriptor().GetRegisterParameter(0), result_register());
- __ Call(callable.code(), RelocInfo::CODE_TARGET);
- RestoreContext();
- PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
- PushOperand(result_register());
- PushOperand(stmt->scope()->scope_info());
- PushFunctionArgumentForContextAllocation();
- CallRuntimeWithOperands(Runtime::kPushWithContext);
- StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
- PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS);
-
- Scope* saved_scope = scope();
- scope_ = stmt->scope();
- { WithOrCatch body(this);
- Visit(stmt->statement());
- }
- scope_ = saved_scope;
-
- // Pop context.
- LoadContextField(context_register(), Context::PREVIOUS_INDEX);
- // Update local stack frame context field.
- StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
+ // Dynamic scoping is not supported.
+ UNREACHABLE();
}
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698