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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 | 480 |
481 | 481 |
482 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op) { | 482 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op) { |
483 DCHECK(op->opcode() == IrOpcode::kJSCreateLiteralArray || | 483 DCHECK(op->opcode() == IrOpcode::kJSCreateLiteralArray || |
484 op->opcode() == IrOpcode::kJSCreateLiteralObject || | 484 op->opcode() == IrOpcode::kJSCreateLiteralObject || |
485 op->opcode() == IrOpcode::kJSCreateLiteralRegExp); | 485 op->opcode() == IrOpcode::kJSCreateLiteralRegExp); |
486 return OpParameter<CreateLiteralParameters>(op); | 486 return OpParameter<CreateLiteralParameters>(op); |
487 } | 487 } |
488 | 488 |
489 | 489 |
490 #define CACHED_OP_LIST(V) \ | 490 #define CACHED_OP_LIST(V) \ |
491 V(Equal, Operator::kNoProperties, 2, 1) \ | 491 V(Equal, Operator::kNoProperties, 2, 1) \ |
492 V(NotEqual, Operator::kNoProperties, 2, 1) \ | 492 V(NotEqual, Operator::kNoProperties, 2, 1) \ |
493 V(StrictEqual, Operator::kNoThrow, 2, 1) \ | 493 V(StrictEqual, Operator::kNoThrow, 2, 1) \ |
494 V(StrictNotEqual, Operator::kNoThrow, 2, 1) \ | 494 V(StrictNotEqual, Operator::kNoThrow, 2, 1) \ |
495 V(ToNumber, Operator::kNoProperties, 1, 1) \ | 495 V(ToNumber, Operator::kNoProperties, 1, 1) \ |
496 V(ToString, Operator::kNoProperties, 1, 1) \ | 496 V(ToString, Operator::kNoProperties, 1, 1) \ |
497 V(ToName, Operator::kNoProperties, 1, 1) \ | 497 V(ToName, Operator::kNoProperties, 1, 1) \ |
498 V(ToObject, Operator::kNoProperties, 1, 1) \ | 498 V(ToObject, Operator::kNoProperties, 1, 1) \ |
499 V(Yield, Operator::kNoProperties, 1, 1) \ | 499 V(Yield, Operator::kNoProperties, 1, 1) \ |
500 V(Create, Operator::kEliminatable, 2, 1) \ | 500 V(Create, Operator::kEliminatable, 2, 1) \ |
501 V(HasProperty, Operator::kNoProperties, 2, 1) \ | 501 V(CreateIterResultObject, Operator::kEliminatable, 2, 1) \ |
502 V(TypeOf, Operator::kEliminatable, 1, 1) \ | 502 V(HasProperty, Operator::kNoProperties, 2, 1) \ |
503 V(InstanceOf, Operator::kNoProperties, 2, 1) \ | 503 V(TypeOf, Operator::kEliminatable, 1, 1) \ |
504 V(ForInDone, Operator::kPure, 2, 1) \ | 504 V(InstanceOf, Operator::kNoProperties, 2, 1) \ |
505 V(ForInNext, Operator::kNoProperties, 4, 1) \ | 505 V(ForInDone, Operator::kPure, 2, 1) \ |
506 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ | 506 V(ForInNext, Operator::kNoProperties, 4, 1) \ |
507 V(ForInStep, Operator::kPure, 1, 1) \ | 507 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ |
508 V(LoadMessage, Operator::kNoThrow, 0, 1) \ | 508 V(ForInStep, Operator::kPure, 1, 1) \ |
509 V(StoreMessage, Operator::kNoThrow, 1, 0) \ | 509 V(LoadMessage, Operator::kNoThrow, 0, 1) \ |
510 V(StackCheck, Operator::kNoProperties, 0, 0) \ | 510 V(StoreMessage, Operator::kNoThrow, 1, 0) \ |
511 V(CreateWithContext, Operator::kNoProperties, 2, 1) \ | 511 V(StackCheck, Operator::kNoProperties, 0, 0) \ |
| 512 V(CreateWithContext, Operator::kNoProperties, 2, 1) \ |
512 V(CreateModuleContext, Operator::kNoProperties, 2, 1) | 513 V(CreateModuleContext, Operator::kNoProperties, 2, 1) |
513 | 514 |
514 | 515 |
515 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \ | 516 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \ |
516 V(LessThan, Operator::kNoProperties, 2, 1) \ | 517 V(LessThan, Operator::kNoProperties, 2, 1) \ |
517 V(GreaterThan, Operator::kNoProperties, 2, 1) \ | 518 V(GreaterThan, Operator::kNoProperties, 2, 1) \ |
518 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \ | 519 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \ |
519 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) | 520 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) |
520 | 521 |
521 | 522 |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- | 1001 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- |
1001 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode | 1002 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode |
1002 "JSCreateScriptContext", // name | 1003 "JSCreateScriptContext", // name |
1003 1, 1, 1, 1, 1, 2, // counts | 1004 1, 1, 1, 1, 1, 2, // counts |
1004 scpope_info); // parameter | 1005 scpope_info); // parameter |
1005 } | 1006 } |
1006 | 1007 |
1007 } // namespace compiler | 1008 } // namespace compiler |
1008 } // namespace internal | 1009 } // namespace internal |
1009 } // namespace v8 | 1010 } // namespace v8 |
OLD | NEW |