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

Side by Side Diff: src/compiler/verifier.cc

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add more tests and fix some bugs Created 5 years, 10 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
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/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 CheckUpperIs(node, Type::Integral32()); 454 CheckUpperIs(node, Type::Integral32());
455 break; 455 break;
456 case IrOpcode::kJSAdd: 456 case IrOpcode::kJSAdd:
457 // Type is Number or String. 457 // Type is Number or String.
458 CheckUpperIs(node, Type::NumberOrString()); 458 CheckUpperIs(node, Type::NumberOrString());
459 break; 459 break;
460 case IrOpcode::kJSSubtract: 460 case IrOpcode::kJSSubtract:
461 case IrOpcode::kJSMultiply: 461 case IrOpcode::kJSMultiply:
462 case IrOpcode::kJSDivide: 462 case IrOpcode::kJSDivide:
463 case IrOpcode::kJSModulus: 463 case IrOpcode::kJSModulus:
464 case IrOpcode::kJSExponentiate:
464 // Type is Number. 465 // Type is Number.
465 CheckUpperIs(node, Type::Number()); 466 CheckUpperIs(node, Type::Number());
466 break; 467 break;
467 468
468 case IrOpcode::kJSToBoolean: 469 case IrOpcode::kJSToBoolean:
469 // Type is Boolean. 470 // Type is Boolean.
470 CheckUpperIs(node, Type::Boolean()); 471 CheckUpperIs(node, Type::Boolean());
471 break; 472 break;
472 case IrOpcode::kJSToNumber: 473 case IrOpcode::kJSToNumber:
473 // Type is Number. 474 // Type is Number.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // (Number, Number) -> Boolean 569 // (Number, Number) -> Boolean
569 CheckValueInputIs(node, 0, Type::Number()); 570 CheckValueInputIs(node, 0, Type::Number());
570 CheckValueInputIs(node, 1, Type::Number()); 571 CheckValueInputIs(node, 1, Type::Number());
571 CheckUpperIs(node, Type::Boolean()); 572 CheckUpperIs(node, Type::Boolean());
572 break; 573 break;
573 case IrOpcode::kNumberAdd: 574 case IrOpcode::kNumberAdd:
574 case IrOpcode::kNumberSubtract: 575 case IrOpcode::kNumberSubtract:
575 case IrOpcode::kNumberMultiply: 576 case IrOpcode::kNumberMultiply:
576 case IrOpcode::kNumberDivide: 577 case IrOpcode::kNumberDivide:
577 case IrOpcode::kNumberModulus: 578 case IrOpcode::kNumberModulus:
579 case IrOpcode::kNumberExponentiate:
578 // (Number, Number) -> Number 580 // (Number, Number) -> Number
579 CheckValueInputIs(node, 0, Type::Number()); 581 CheckValueInputIs(node, 0, Type::Number());
580 CheckValueInputIs(node, 1, Type::Number()); 582 CheckValueInputIs(node, 1, Type::Number());
581 // TODO(rossberg): activate once we retype after opcode changes. 583 // TODO(rossberg): activate once we retype after opcode changes.
582 // CheckUpperIs(node, Type::Number()); 584 // CheckUpperIs(node, Type::Number());
583 break; 585 break;
584 case IrOpcode::kNumberToInt32: 586 case IrOpcode::kNumberToInt32:
585 // Number -> Signed32 587 // Number -> Signed32
586 CheckValueInputIs(node, 0, Type::Number()); 588 CheckValueInputIs(node, 0, Type::Number());
587 CheckUpperIs(node, Type::Signed32()); 589 CheckUpperIs(node, Type::Signed32());
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 // Check inputs for all nodes in the block. 1051 // Check inputs for all nodes in the block.
1050 for (size_t i = 0; i < block->NodeCount(); i++) { 1052 for (size_t i = 0; i < block->NodeCount(); i++) {
1051 Node* node = block->NodeAt(i); 1053 Node* node = block->NodeAt(i);
1052 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1054 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1053 } 1055 }
1054 } 1056 }
1055 } 1057 }
1056 } 1058 }
1057 } 1059 }
1058 } // namespace v8::internal::compiler 1060 } // namespace v8::internal::compiler
OLDNEW
« src/compiler/typer.cc ('K') | « src/compiler/typer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698