OLD | NEW |
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/js-operator.h" | 5 #include "src/compiler/js-operator.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/lazy-instance.h" | 9 #include "src/base/lazy-instance.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 op->opcode() == IrOpcode::kJSNotEqual || | 510 op->opcode() == IrOpcode::kJSNotEqual || |
511 op->opcode() == IrOpcode::kJSStrictEqual || | 511 op->opcode() == IrOpcode::kJSStrictEqual || |
512 op->opcode() == IrOpcode::kJSStrictNotEqual || | 512 op->opcode() == IrOpcode::kJSStrictNotEqual || |
513 op->opcode() == IrOpcode::kJSLessThan || | 513 op->opcode() == IrOpcode::kJSLessThan || |
514 op->opcode() == IrOpcode::kJSGreaterThan || | 514 op->opcode() == IrOpcode::kJSGreaterThan || |
515 op->opcode() == IrOpcode::kJSLessThanOrEqual || | 515 op->opcode() == IrOpcode::kJSLessThanOrEqual || |
516 op->opcode() == IrOpcode::kJSGreaterThanOrEqual); | 516 op->opcode() == IrOpcode::kJSGreaterThanOrEqual); |
517 return OpParameter<CompareOperationHint>(op); | 517 return OpParameter<CompareOperationHint>(op); |
518 } | 518 } |
519 | 519 |
520 #define CACHED_OP_LIST(V) \ | 520 #define CACHED_OP_LIST(V) \ |
521 V(ToInteger, Operator::kNoProperties, 1, 1) \ | 521 V(ToInteger, Operator::kNoProperties, 1, 1) \ |
522 V(ToLength, Operator::kNoProperties, 1, 1) \ | 522 V(ToLength, Operator::kNoProperties, 1, 1) \ |
523 V(ToName, Operator::kNoProperties, 1, 1) \ | 523 V(ToName, Operator::kNoProperties, 1, 1) \ |
524 V(ToNumber, Operator::kNoProperties, 1, 1) \ | 524 V(ToNumber, Operator::kNoProperties, 1, 1) \ |
525 V(ToObject, Operator::kFoldable, 1, 1) \ | 525 V(ToObject, Operator::kFoldable, 1, 1) \ |
526 V(ToString, Operator::kNoProperties, 1, 1) \ | 526 V(ToString, Operator::kNoProperties, 1, 1) \ |
527 V(Create, Operator::kEliminatable, 2, 1) \ | 527 V(Create, Operator::kEliminatable, 2, 1) \ |
528 V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \ | 528 V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \ |
529 V(CreateKeyValueArray, Operator::kEliminatable, 2, 1) \ | 529 V(CreateKeyValueArray, Operator::kEliminatable, 2, 1) \ |
530 V(HasProperty, Operator::kNoProperties, 2, 1) \ | 530 V(HasProperty, Operator::kNoProperties, 2, 1) \ |
531 V(TypeOf, Operator::kPure, 1, 1) \ | 531 V(TypeOf, Operator::kPure, 1, 1) \ |
532 V(InstanceOf, Operator::kNoProperties, 2, 1) \ | 532 V(InstanceOf, Operator::kNoProperties, 2, 1) \ |
533 V(OrdinaryHasInstance, Operator::kNoProperties, 2, 1) \ | 533 V(OrdinaryHasInstance, Operator::kNoProperties, 2, 1) \ |
534 V(ForInNext, Operator::kNoProperties, 4, 1) \ | 534 V(ForInNext, Operator::kNoProperties, 4, 1) \ |
535 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ | 535 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ |
536 V(LoadMessage, Operator::kNoThrow, 0, 1) \ | 536 V(LoadMessage, Operator::kNoThrow | Operator::kNoWrite, 0, 1) \ |
537 V(StoreMessage, Operator::kNoThrow, 1, 0) \ | 537 V(StoreMessage, Operator::kNoRead | Operator::kNoThrow, 1, 0) \ |
538 V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \ | 538 V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \ |
539 V(StackCheck, Operator::kNoWrite, 0, 0) \ | 539 V(StackCheck, Operator::kNoWrite, 0, 0) \ |
540 V(GetSuperConstructor, Operator::kNoWrite, 1, 1) | 540 V(GetSuperConstructor, Operator::kNoWrite, 1, 1) |
541 | 541 |
542 #define BINARY_OP_LIST(V) \ | 542 #define BINARY_OP_LIST(V) \ |
543 V(BitwiseOr) \ | 543 V(BitwiseOr) \ |
544 V(BitwiseXor) \ | 544 V(BitwiseXor) \ |
545 V(BitwiseAnd) \ | 545 V(BitwiseAnd) \ |
546 V(ShiftLeft) \ | 546 V(ShiftLeft) \ |
547 V(ShiftRight) \ | 547 V(ShiftRight) \ |
548 V(ShiftRightLogical) \ | 548 V(ShiftRightLogical) \ |
549 V(Add) \ | 549 V(Add) \ |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- | 1007 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- |
1008 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode | 1008 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode |
1009 "JSCreateScriptContext", // name | 1009 "JSCreateScriptContext", // name |
1010 1, 1, 1, 1, 1, 2, // counts | 1010 1, 1, 1, 1, 1, 2, // counts |
1011 scope_info); // parameter | 1011 scope_info); // parameter |
1012 } | 1012 } |
1013 | 1013 |
1014 } // namespace compiler | 1014 } // namespace compiler |
1015 } // namespace internal | 1015 } // namespace internal |
1016 } // namespace v8 | 1016 } // namespace v8 |
OLD | NEW |