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

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

Issue 2126233002: Devirtualize AstNode and subclasses, except for visiting-related methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 4 years, 5 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/compiler/ast-graph-builder.h ('k') | src/crankshaft/hydrogen.h » ('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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 Visit(stmt); 2959 Visit(stmt);
2960 } 2960 }
2961 2961
2962 2962
2963 void AstGraphBuilder::VisitInScope(Statement* stmt, Scope* s, Node* context) { 2963 void AstGraphBuilder::VisitInScope(Statement* stmt, Scope* s, Node* context) {
2964 ContextScope scope(this, s, context); 2964 ContextScope scope(this, s, context);
2965 DCHECK(s->declarations()->is_empty()); 2965 DCHECK(s->declarations()->is_empty());
2966 Visit(stmt); 2966 Visit(stmt);
2967 } 2967 }
2968 2968
2969 2969 template <class IterationStatement>
2970 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt, 2970 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt,
2971 LoopBuilder* loop) { 2971 LoopBuilder* loop) {
2972 ControlScopeForIteration scope(this, stmt, loop); 2972 ControlScopeForIteration scope(this, stmt, loop);
2973 if (FLAG_turbo_loop_stackcheck || !info()->shared_info()->asm_function()) { 2973 if (FLAG_turbo_loop_stackcheck || !info()->shared_info()->asm_function()) {
2974 Node* node = NewNode(javascript()->StackCheck()); 2974 Node* node = NewNode(javascript()->StackCheck());
2975 PrepareFrameState(node, stmt->StackCheckId()); 2975 PrepareFrameState(node, stmt->StackCheckId());
Michael Starzinger 2016/07/14 08:38:51 I think if we were to devirtualize IterationStatem
Michael Starzinger 2016/07/14 08:47:01 Alternatively Jaro suggested to just pass in the "
2976 } 2976 }
2977 Visit(stmt->body()); 2977 Visit(stmt->body());
2978 } 2978 }
2979 2979
2980 2980
2981 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) { 2981 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) {
2982 Node* value; 2982 Node* value;
2983 if (expr->expression()->IsVariableProxy()) { 2983 if (expr->expression()->IsVariableProxy()) {
2984 // Delete of an unqualified identifier is only allowed in classic mode but 2984 // Delete of an unqualified identifier is only allowed in classic mode but
2985 // deleting "this" is allowed in all language modes. 2985 // deleting "this" is allowed in all language modes.
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
4369 // Phi does not exist yet, introduce one. 4369 // Phi does not exist yet, introduce one.
4370 value = NewPhi(inputs, value, control); 4370 value = NewPhi(inputs, value, control);
4371 value->ReplaceInput(inputs - 1, other); 4371 value->ReplaceInput(inputs - 1, other);
4372 } 4372 }
4373 return value; 4373 return value;
4374 } 4374 }
4375 4375
4376 } // namespace compiler 4376 } // namespace compiler
4377 } // namespace internal 4377 } // namespace internal
4378 } // namespace v8 4378 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698