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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1332873003: Implement sloppy-mode block-defined functions (Annex B 3.3) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve type clarity Created 5 years, 3 months 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/ast-numbering.cc ('k') | src/compiler/ast-loop-assignment-analyzer.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 void AstGraphBuilder::VisitExpressionStatement(ExpressionStatement* stmt) { 1151 void AstGraphBuilder::VisitExpressionStatement(ExpressionStatement* stmt) {
1152 VisitForEffect(stmt->expression()); 1152 VisitForEffect(stmt->expression());
1153 } 1153 }
1154 1154
1155 1155
1156 void AstGraphBuilder::VisitEmptyStatement(EmptyStatement* stmt) { 1156 void AstGraphBuilder::VisitEmptyStatement(EmptyStatement* stmt) {
1157 // Do nothing. 1157 // Do nothing.
1158 } 1158 }
1159 1159
1160 1160
1161 void AstGraphBuilder::VisitSloppyBlockFunctionStatement(
1162 SloppyBlockFunctionStatement* stmt) {
1163 Visit(stmt->statement());
1164 }
1165
1166
1161 void AstGraphBuilder::VisitIfStatement(IfStatement* stmt) { 1167 void AstGraphBuilder::VisitIfStatement(IfStatement* stmt) {
1162 IfBuilder compare_if(this); 1168 IfBuilder compare_if(this);
1163 VisitForTest(stmt->condition()); 1169 VisitForTest(stmt->condition());
1164 Node* condition = environment()->Pop(); 1170 Node* condition = environment()->Pop();
1165 compare_if.If(condition); 1171 compare_if.If(condition);
1166 compare_if.Then(); 1172 compare_if.Then();
1167 Visit(stmt->then_statement()); 1173 Visit(stmt->then_statement());
1168 compare_if.Else(); 1174 compare_if.Else();
1169 Visit(stmt->else_statement()); 1175 Visit(stmt->else_statement());
1170 compare_if.End(); 1176 compare_if.End();
(...skipping 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after
4250 // Phi does not exist yet, introduce one. 4256 // Phi does not exist yet, introduce one.
4251 value = NewPhi(inputs, value, control); 4257 value = NewPhi(inputs, value, control);
4252 value->ReplaceInput(inputs - 1, other); 4258 value->ReplaceInput(inputs - 1, other);
4253 } 4259 }
4254 return value; 4260 return value;
4255 } 4261 }
4256 4262
4257 } // namespace compiler 4263 } // namespace compiler
4258 } // namespace internal 4264 } // namespace internal
4259 } // namespace v8 4265 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast-numbering.cc ('k') | src/compiler/ast-loop-assignment-analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698