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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1309813007: [es6] implement destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase*** oops Created 5 years 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/full-codegen/full-codegen.cc ('k') | src/messages.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/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/control-flow-builders.h" 9 #include "src/interpreter/control-flow-builders.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 BytecodeLabel end_label; 2029 BytecodeLabel end_label;
2030 VisitForAccumulatorValue(left); 2030 VisitForAccumulatorValue(left);
2031 builder()->JumpIfFalse(&end_label); 2031 builder()->JumpIfFalse(&end_label);
2032 VisitForAccumulatorValue(right); 2032 VisitForAccumulatorValue(right);
2033 builder()->Bind(&end_label); 2033 builder()->Bind(&end_label);
2034 } 2034 }
2035 execution_result()->SetResultInAccumulator(); 2035 execution_result()->SetResultInAccumulator();
2036 } 2036 }
2037 2037
2038 2038
2039 void BytecodeGenerator::VisitRewritableAssignmentExpression(
2040 RewritableAssignmentExpression* expr) {
2041 Visit(expr->expression());
2042 }
2043
2044
2039 void BytecodeGenerator::VisitNewLocalFunctionContext() { 2045 void BytecodeGenerator::VisitNewLocalFunctionContext() {
2040 AccumulatorResultScope accumulator_execution_result(this); 2046 AccumulatorResultScope accumulator_execution_result(this);
2041 Scope* scope = this->scope(); 2047 Scope* scope = this->scope();
2042 2048
2043 // Allocate a new local context. 2049 // Allocate a new local context.
2044 if (scope->is_script_scope()) { 2050 if (scope->is_script_scope()) {
2045 TemporaryRegisterScope temporary_register_scope(builder()); 2051 TemporaryRegisterScope temporary_register_scope(builder());
2046 Register closure = temporary_register_scope.NewRegister(); 2052 Register closure = temporary_register_scope.NewRegister();
2047 Register scope_info = temporary_register_scope.NewRegister(); 2053 Register scope_info = temporary_register_scope.NewRegister();
2048 DCHECK(Register::AreContiguous(closure, scope_info)); 2054 DCHECK(Register::AreContiguous(closure, scope_info));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2238 }
2233 2239
2234 2240
2235 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2241 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2236 return info()->feedback_vector()->GetIndex(slot); 2242 return info()->feedback_vector()->GetIndex(slot);
2237 } 2243 }
2238 2244
2239 } // namespace interpreter 2245 } // namespace interpreter
2240 } // namespace internal 2246 } // namespace internal
2241 } // namespace v8 2247 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698