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

Side by Side Diff: src/crankshaft/hydrogen.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/compiler/ast-loop-assignment-analyzer.cc ('k') | src/crankshaft/typing.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 7021 matching lines...) Expand 10 before | Expand all | Expand 10 after
7032 } else { 7032 } else {
7033 return Bailout(kInvalidLhsInCompoundAssignment); 7033 return Bailout(kInvalidLhsInCompoundAssignment);
7034 } 7034 }
7035 } 7035 }
7036 7036
7037 7037
7038 void HOptimizedGraphBuilder::VisitAssignment(Assignment* expr) { 7038 void HOptimizedGraphBuilder::VisitAssignment(Assignment* expr) {
7039 DCHECK(!HasStackOverflow()); 7039 DCHECK(!HasStackOverflow());
7040 DCHECK(current_block() != NULL); 7040 DCHECK(current_block() != NULL);
7041 DCHECK(current_block()->HasPredecessor()); 7041 DCHECK(current_block()->HasPredecessor());
7042
7042 VariableProxy* proxy = expr->target()->AsVariableProxy(); 7043 VariableProxy* proxy = expr->target()->AsVariableProxy();
7043 Property* prop = expr->target()->AsProperty(); 7044 Property* prop = expr->target()->AsProperty();
7044 DCHECK(proxy == NULL || prop == NULL); 7045 DCHECK(proxy == NULL || prop == NULL);
7045 7046
7046 if (expr->is_compound()) { 7047 if (expr->is_compound()) {
7047 HandleCompoundAssignment(expr); 7048 HandleCompoundAssignment(expr);
7048 return; 7049 return;
7049 } 7050 }
7050 7051
7051 if (prop != NULL) { 7052 if (prop != NULL) {
(...skipping 5074 matching lines...) Expand 10 before | Expand all | Expand 10 after
12126 UNREACHABLE(); 12127 UNREACHABLE();
12127 } 12128 }
12128 12129
12129 12130
12130 void HOptimizedGraphBuilder::VisitExportDeclaration( 12131 void HOptimizedGraphBuilder::VisitExportDeclaration(
12131 ExportDeclaration* declaration) { 12132 ExportDeclaration* declaration) {
12132 UNREACHABLE(); 12133 UNREACHABLE();
12133 } 12134 }
12134 12135
12135 12136
12137 void HOptimizedGraphBuilder::VisitRewritableAssignmentExpression(
12138 RewritableAssignmentExpression* node) {
12139 CHECK_ALIVE(Visit(node->expression()));
12140 }
12141
12142
12136 // Generators for inline runtime functions. 12143 // Generators for inline runtime functions.
12137 // Support for types. 12144 // Support for types.
12138 void HOptimizedGraphBuilder::GenerateIsSmi(CallRuntime* call) { 12145 void HOptimizedGraphBuilder::GenerateIsSmi(CallRuntime* call) {
12139 DCHECK(call->arguments()->length() == 1); 12146 DCHECK(call->arguments()->length() == 1);
12140 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12147 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12141 HValue* value = Pop(); 12148 HValue* value = Pop();
12142 HIsSmiAndBranch* result = New<HIsSmiAndBranch>(value); 12149 HIsSmiAndBranch* result = New<HIsSmiAndBranch>(value);
12143 return ast_context()->ReturnControl(result, call->id()); 12150 return ast_context()->ReturnControl(result, call->id());
12144 } 12151 }
12145 12152
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
13607 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13614 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13608 } 13615 }
13609 13616
13610 #ifdef DEBUG 13617 #ifdef DEBUG
13611 graph_->Verify(false); // No full verify. 13618 graph_->Verify(false); // No full verify.
13612 #endif 13619 #endif
13613 } 13620 }
13614 13621
13615 } // namespace internal 13622 } // namespace internal
13616 } // namespace v8 13623 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-loop-assignment-analyzer.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698