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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1309813007: [es6] implement destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cache te right scope in DeclareAndInitializeVariables() 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 1752
1753 if (result_saved) { 1753 if (result_saved) {
1754 context()->PlugTOS(); 1754 context()->PlugTOS();
1755 } else { 1755 } else {
1756 context()->Plug(rax); 1756 context()->Plug(rax);
1757 } 1757 }
1758 } 1758 }
1759 1759
1760 1760
1761 void FullCodeGenerator::VisitAssignment(Assignment* expr) { 1761 void FullCodeGenerator::VisitAssignment(Assignment* expr) {
1762 RETURN_IF_VISIT_NODE(expr->destructuring_assignment());
1762 DCHECK(expr->target()->IsValidReferenceExpressionOrThis()); 1763 DCHECK(expr->target()->IsValidReferenceExpressionOrThis());
1763 1764
1764 Comment cmnt(masm_, "[ Assignment"); 1765 Comment cmnt(masm_, "[ Assignment");
1765 SetExpressionPosition(expr, INSERT_BREAK); 1766 SetExpressionPosition(expr, INSERT_BREAK);
1766 1767
1767 Property* property = expr->target()->AsProperty(); 1768 Property* property = expr->target()->AsProperty();
1768 LhsKind assign_type = Property::GetAssignType(property); 1769 LhsKind assign_type = Property::GetAssignType(property);
1769 1770
1770 // Evaluate LHS expression. 1771 // Evaluate LHS expression.
1771 switch (assign_type) { 1772 switch (assign_type) {
(...skipping 3155 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 Assembler::target_address_at(call_target_address, 4928 Assembler::target_address_at(call_target_address,
4928 unoptimized_code)); 4929 unoptimized_code));
4929 return OSR_AFTER_STACK_CHECK; 4930 return OSR_AFTER_STACK_CHECK;
4930 } 4931 }
4931 4932
4932 4933
4933 } // namespace internal 4934 } // namespace internal
4934 } // namespace v8 4935 } // namespace v8
4935 4936
4936 #endif // V8_TARGET_ARCH_X64 4937 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698