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

Side by Side Diff: src/compiler/representation-change.cc

Issue 1479503002: [turbofan] Require proper typing when inferring machine type from big-boy type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/representation-change.h" 5 #include "src/compiler/representation-change.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 case IrOpcode::kNumberLessThanOrEqual: 464 case IrOpcode::kNumberLessThanOrEqual:
465 return machine()->Float64LessThanOrEqual(); 465 return machine()->Float64LessThanOrEqual();
466 default: 466 default:
467 UNREACHABLE(); 467 UNREACHABLE();
468 return NULL; 468 return NULL;
469 } 469 }
470 } 470 }
471 471
472 472
473 MachineType RepresentationChanger::TypeFromUpperBound(Type* type) { 473 MachineType RepresentationChanger::TypeFromUpperBound(Type* type) {
474 if (type->Is(Type::None())) 474 CHECK(!type->Is(Type::None()));
475 return kTypeAny; // TODO(titzer): should be an error
476 if (type->Is(Type::Signed32())) return kTypeInt32; 475 if (type->Is(Type::Signed32())) return kTypeInt32;
477 if (type->Is(Type::Unsigned32())) return kTypeUint32; 476 if (type->Is(Type::Unsigned32())) return kTypeUint32;
478 if (type->Is(Type::Number())) return kTypeNumber; 477 if (type->Is(Type::Number())) return kTypeNumber;
479 if (type->Is(Type::Boolean())) return kTypeBool; 478 if (type->Is(Type::Boolean())) return kTypeBool;
480 return kTypeAny; 479 return kTypeAny;
481 } 480 }
482 481
483 482
484 Node* RepresentationChanger::TypeError(Node* node, MachineTypeUnion output_type, 483 Node* RepresentationChanger::TypeError(Node* node, MachineTypeUnion output_type,
485 MachineTypeUnion use) { 484 MachineTypeUnion use) {
(...skipping 21 matching lines...) Expand all
507 506
508 507
509 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { 508 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {
510 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), 509 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(),
511 node); 510 node);
512 } 511 }
513 512
514 } // namespace compiler 513 } // namespace compiler
515 } // namespace internal 514 } // namespace internal
516 } // namespace v8 515 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698