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

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: An implementation Created 5 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 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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 if (result_saved) { 1783 if (result_saved) {
1784 __ Drop(1); // literal index 1784 __ Drop(1); // literal index
1785 context()->PlugTOS(); 1785 context()->PlugTOS();
1786 } else { 1786 } else {
1787 context()->Plug(rax); 1787 context()->Plug(rax);
1788 } 1788 }
1789 } 1789 }
1790 1790
1791 1791
1792 void FullCodeGenerator::VisitAssignment(Assignment* expr) { 1792 void FullCodeGenerator::VisitAssignment(Assignment* expr) {
1793 AssignmentPattern* pattern = expr->target()->AsAssignmentPattern();
1794 if (pattern && pattern->is_rewritten()) return Visit(pattern);
1793 DCHECK(expr->target()->IsValidReferenceExpressionOrThis()); 1795 DCHECK(expr->target()->IsValidReferenceExpressionOrThis());
1794 1796
1795 Comment cmnt(masm_, "[ Assignment"); 1797 Comment cmnt(masm_, "[ Assignment");
1796 SetExpressionPosition(expr, INSERT_BREAK); 1798 SetExpressionPosition(expr, INSERT_BREAK);
1797 1799
1798 Property* property = expr->target()->AsProperty(); 1800 Property* property = expr->target()->AsProperty();
1799 LhsKind assign_type = Property::GetAssignType(property); 1801 LhsKind assign_type = Property::GetAssignType(property);
1800 1802
1801 // Evaluate LHS expression. 1803 // Evaluate LHS expression.
1802 switch (assign_type) { 1804 switch (assign_type) {
(...skipping 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4975 Assembler::target_address_at(call_target_address, 4977 Assembler::target_address_at(call_target_address,
4976 unoptimized_code)); 4978 unoptimized_code));
4977 return OSR_AFTER_STACK_CHECK; 4979 return OSR_AFTER_STACK_CHECK;
4978 } 4980 }
4979 4981
4980 4982
4981 } // namespace internal 4983 } // namespace internal
4982 } // namespace v8 4984 } // namespace v8
4983 4985
4984 #endif // V8_TARGET_ARCH_X64 4986 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698