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

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: Remove facilities for rewriting the expression multiple ways 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
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::VisitRewritableExpression(RewritableExpression* expr) {
2040 Visit(expr->expression());
2041 }
2042
2043
2039 void BytecodeGenerator::VisitNewLocalFunctionContext() { 2044 void BytecodeGenerator::VisitNewLocalFunctionContext() {
2040 AccumulatorResultScope accumulator_execution_result(this); 2045 AccumulatorResultScope accumulator_execution_result(this);
2041 Scope* scope = this->scope(); 2046 Scope* scope = this->scope();
2042 2047
2043 // Allocate a new local context. 2048 // Allocate a new local context.
2044 if (scope->is_script_scope()) { 2049 if (scope->is_script_scope()) {
2045 TemporaryRegisterScope temporary_register_scope(builder()); 2050 TemporaryRegisterScope temporary_register_scope(builder());
2046 Register closure = temporary_register_scope.NewRegister(); 2051 Register closure = temporary_register_scope.NewRegister();
2047 Register scope_info = temporary_register_scope.NewRegister(); 2052 Register scope_info = temporary_register_scope.NewRegister();
2048 DCHECK(Register::AreContiguous(closure, scope_info)); 2053 DCHECK(Register::AreContiguous(closure, scope_info));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2237 }
2233 2238
2234 2239
2235 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2240 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2236 return info()->feedback_vector()->GetIndex(slot); 2241 return info()->feedback_vector()->GetIndex(slot);
2237 } 2242 }
2238 2243
2239 } // namespace interpreter 2244 } // namespace interpreter
2240 } // namespace internal 2245 } // namespace internal
2241 } // namespace v8 2246 } // namespace v8
OLDNEW
« src/flag-definitions.h ('K') | « 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