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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2151223002: [turbofan] Add re-typing for PlainPrimitiveToNumber during representation inference. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | test/mjsunit/compiler/regress-628516.js » ('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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // fail on a boolean. OperationTyper should have a function that 450 // fail on a boolean. OperationTyper should have a function that
451 // computes a more precise type. 451 // computes a more precise type.
452 Type* lhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0))); 452 Type* lhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0)));
453 Type* rhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(1))); 453 Type* rhs = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(1)));
454 Type* computed_type = op_typer_.NumberModulus(lhs, rhs); 454 Type* computed_type = op_typer_.NumberModulus(lhs, rhs);
455 new_type = Type::Intersect(computed_type, info->restriction_type(), 455 new_type = Type::Intersect(computed_type, info->restriction_type(),
456 graph_zone()); 456 graph_zone());
457 break; 457 break;
458 } 458 }
459 459
460 case IrOpcode::kPlainPrimitiveToNumber:
461 new_type = op_typer_.ToNumber(FeedbackTypeOf(node->InputAt(0)));
462 break;
463
460 case IrOpcode::kNumberAbs: { 464 case IrOpcode::kNumberAbs: {
461 new_type = op_typer_.NumberAbs(FeedbackTypeOf(node->InputAt(0))); 465 new_type = op_typer_.NumberAbs(FeedbackTypeOf(node->InputAt(0)));
462 break; 466 break;
463 } 467 }
464 468
465 case IrOpcode::kPhi: { 469 case IrOpcode::kPhi: {
466 new_type = TypePhi(node); 470 new_type = TypePhi(node);
467 if (type != nullptr) { 471 if (type != nullptr) {
468 new_type = Weaken(node, type, new_type); 472 new_type = Weaken(node, type, new_type);
469 } 473 }
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
3342 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3346 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3343 Operator::kNoProperties); 3347 Operator::kNoProperties);
3344 to_number_operator_.set(common()->Call(desc)); 3348 to_number_operator_.set(common()->Call(desc));
3345 } 3349 }
3346 return to_number_operator_.get(); 3350 return to_number_operator_.get();
3347 } 3351 }
3348 3352
3349 } // namespace compiler 3353 } // namespace compiler
3350 } // namespace internal 3354 } // namespace internal
3351 } // namespace v8 3355 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-628516.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698