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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 V(HasProperty, Operator::kNoProperties, 2, 1) \ | 467 V(HasProperty, Operator::kNoProperties, 2, 1) \ |
468 V(TypeOf, Operator::kPure, 1, 1) \ | 468 V(TypeOf, Operator::kPure, 1, 1) \ |
469 V(InstanceOf, Operator::kNoProperties, 2, 1) \ | 469 V(InstanceOf, Operator::kNoProperties, 2, 1) \ |
470 V(ForInDone, Operator::kPure, 2, 1) \ | 470 V(ForInDone, Operator::kPure, 2, 1) \ |
471 V(ForInNext, Operator::kNoProperties, 4, 1) \ | 471 V(ForInNext, Operator::kNoProperties, 4, 1) \ |
472 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ | 472 V(ForInPrepare, Operator::kNoProperties, 1, 3) \ |
473 V(ForInStep, Operator::kPure, 1, 1) \ | 473 V(ForInStep, Operator::kPure, 1, 1) \ |
474 V(StackCheck, Operator::kNoProperties, 0, 0) \ | 474 V(StackCheck, Operator::kNoProperties, 0, 0) \ |
475 V(CreateFunctionContext, Operator::kNoProperties, 1, 1) \ | 475 V(CreateFunctionContext, Operator::kNoProperties, 1, 1) \ |
476 V(CreateWithContext, Operator::kNoProperties, 2, 1) \ | 476 V(CreateWithContext, Operator::kNoProperties, 2, 1) \ |
477 V(CreateBlockContext, Operator::kNoProperties, 2, 1) \ | 477 V(CreateModuleContext, Operator::kNoProperties, 2, 1) |
478 V(CreateModuleContext, Operator::kNoProperties, 2, 1) \ | |
479 V(CreateScriptContext, Operator::kNoProperties, 2, 1) | |
480 | 478 |
481 | 479 |
482 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \ | 480 #define CACHED_OP_LIST_WITH_LANGUAGE_MODE(V) \ |
483 V(LessThan, Operator::kNoProperties, 2, 1) \ | 481 V(LessThan, Operator::kNoProperties, 2, 1) \ |
484 V(GreaterThan, Operator::kNoProperties, 2, 1) \ | 482 V(GreaterThan, Operator::kNoProperties, 2, 1) \ |
485 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \ | 483 V(LessThanOrEqual, Operator::kNoProperties, 2, 1) \ |
486 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) \ | 484 V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1) \ |
487 V(BitwiseOr, Operator::kNoProperties, 2, 1) \ | 485 V(BitwiseOr, Operator::kNoProperties, 2, 1) \ |
488 V(BitwiseXor, Operator::kNoProperties, 2, 1) \ | 486 V(BitwiseXor, Operator::kNoProperties, 2, 1) \ |
489 V(BitwiseAnd, Operator::kNoProperties, 2, 1) \ | 487 V(BitwiseAnd, Operator::kNoProperties, 2, 1) \ |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 const Operator* JSOperatorBuilder::CreateCatchContext( | 776 const Operator* JSOperatorBuilder::CreateCatchContext( |
779 const Handle<String>& name) { | 777 const Handle<String>& name) { |
780 return new (zone()) Operator1<Handle<String>, Handle<String>::equal_to, | 778 return new (zone()) Operator1<Handle<String>, Handle<String>::equal_to, |
781 Handle<String>::hash>( // -- | 779 Handle<String>::hash>( // -- |
782 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode | 780 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode |
783 "JSCreateCatchContext", // name | 781 "JSCreateCatchContext", // name |
784 2, 1, 1, 1, 1, 2, // counts | 782 2, 1, 1, 1, 1, 2, // counts |
785 name); // parameter | 783 name); // parameter |
786 } | 784 } |
787 | 785 |
| 786 |
| 787 const Operator* JSOperatorBuilder::CreateBlockContext( |
| 788 const Handle<ScopeInfo>& scpope_info) { |
| 789 return new (zone()) Operator1<Handle<ScopeInfo>, Handle<ScopeInfo>::equal_to, |
| 790 Handle<ScopeInfo>::hash>( // -- |
| 791 IrOpcode::kJSCreateBlockContext, Operator::kNoProperties, // opcode |
| 792 "JSCreateBlockContext", // name |
| 793 1, 1, 1, 1, 1, 2, // counts |
| 794 scpope_info); // parameter |
| 795 } |
| 796 |
| 797 |
| 798 const Operator* JSOperatorBuilder::CreateScriptContext( |
| 799 const Handle<ScopeInfo>& scpope_info) { |
| 800 return new (zone()) Operator1<Handle<ScopeInfo>, Handle<ScopeInfo>::equal_to, |
| 801 Handle<ScopeInfo>::hash>( // -- |
| 802 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode |
| 803 "JSCreateScriptContext", // name |
| 804 1, 1, 1, 1, 1, 2, // counts |
| 805 scpope_info); // parameter |
| 806 } |
| 807 |
788 } // namespace compiler | 808 } // namespace compiler |
789 } // namespace internal | 809 } // namespace internal |
790 } // namespace v8 | 810 } // namespace v8 |
OLD | NEW |