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

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

Issue 1086083002: [turbofan] Fix ForInStatement that deopts during filter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ported to all architectures. Created 5 years, 8 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.h ('k') | src/ia32/full-codegen-ia32.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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 test_should_filter.Then(); 1263 test_should_filter.Then();
1264 value = environment()->Pop(); 1264 value = environment()->Pop();
1265 Node* builtins = BuildLoadBuiltinsObject(); 1265 Node* builtins = BuildLoadBuiltinsObject();
1266 Node* function = BuildLoadObjectField( 1266 Node* function = BuildLoadObjectField(
1267 builtins, 1267 builtins,
1268 JSBuiltinsObject::OffsetOfFunctionWithId(Builtins::FILTER_KEY)); 1268 JSBuiltinsObject::OffsetOfFunctionWithId(Builtins::FILTER_KEY));
1269 // result is either the string key or Smi(0) indicating the property 1269 // result is either the string key or Smi(0) indicating the property
1270 // is gone. 1270 // is gone.
1271 Node* res = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS), 1271 Node* res = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS),
1272 function, obj, value); 1272 function, obj, value);
1273 // TODO(jarin): provide real bailout id. 1273 PrepareFrameState(res, stmt->FilterId(), OutputFrameStateCombine::Push());
1274 PrepareFrameState(res, BailoutId::None());
1275 Node* property_missing = 1274 Node* property_missing =
1276 NewNode(javascript()->StrictEqual(), res, jsgraph()->ZeroConstant()); 1275 NewNode(javascript()->StrictEqual(), res, jsgraph()->ZeroConstant());
1277 { 1276 {
1278 IfBuilder is_property_missing(this); 1277 IfBuilder is_property_missing(this);
1279 is_property_missing.If(property_missing); 1278 is_property_missing.If(property_missing);
1280 is_property_missing.Then(); 1279 is_property_missing.Then();
1281 // Inc counter and continue. 1280 // Inc counter and continue.
1282 Node* index_inc = 1281 Node* index_inc =
1283 NewNode(javascript()->Add(), index, jsgraph()->OneConstant()); 1282 NewNode(javascript()->Add(), index, jsgraph()->OneConstant());
1284 // TODO(jarin): provide real bailout id. 1283 // TODO(jarin): provide real bailout id.
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after
3551 // Phi does not exist yet, introduce one. 3550 // Phi does not exist yet, introduce one.
3552 value = NewPhi(inputs, value, control); 3551 value = NewPhi(inputs, value, control);
3553 value->ReplaceInput(inputs - 1, other); 3552 value->ReplaceInput(inputs - 1, other);
3554 } 3553 }
3555 return value; 3554 return value;
3556 } 3555 }
3557 3556
3558 } // namespace compiler 3557 } // namespace compiler
3559 } // namespace internal 3558 } // namespace internal
3560 } // namespace v8 3559 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698