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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
593 | 593 |
594 const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) { | 594 const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) { |
595 // TODO(turbofan): Cache most important versions of this operator. | 595 // TODO(turbofan): Cache most important versions of this operator. |
596 return new (zone()) Operator1<ToBooleanHints>( //-- | 596 return new (zone()) Operator1<ToBooleanHints>( //-- |
597 IrOpcode::kJSToBoolean, Operator::kPure, // opcode | 597 IrOpcode::kJSToBoolean, Operator::kPure, // opcode |
598 "JSToBoolean", // name | 598 "JSToBoolean", // name |
599 1, 0, 0, 1, 0, 0, // inputs/outputs | 599 1, 0, 0, 1, 0, 0, // inputs/outputs |
600 hints); // parameter | 600 hints); // parameter |
601 } | 601 } |
602 | 602 |
603 const Operator* JSOperatorBuilder::IsUndetectable() { | |
604 // TODO(mythria): Check if we need to cache this operation. | |
605 return new (zone()) Operator( // -- | |
606 IrOpcode::kJSIsUndetectable, Operator::kPure, // opcode | |
mythria
2016/12/05 10:05:42
If my understanding is correct, this operation doe
| |
607 "JSTestUndetectable", // name | |
608 1, 0, 0, 1, 0, 0); // inputs/outputs | |
609 } | |
610 | |
603 const Operator* JSOperatorBuilder::CallFunction( | 611 const Operator* JSOperatorBuilder::CallFunction( |
604 size_t arity, float frequency, VectorSlotPair const& feedback, | 612 size_t arity, float frequency, VectorSlotPair const& feedback, |
605 ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) { | 613 ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) { |
606 CallFunctionParameters parameters(arity, frequency, feedback, tail_call_mode, | 614 CallFunctionParameters parameters(arity, frequency, feedback, tail_call_mode, |
607 convert_mode); | 615 convert_mode); |
608 return new (zone()) Operator1<CallFunctionParameters>( // -- | 616 return new (zone()) Operator1<CallFunctionParameters>( // -- |
609 IrOpcode::kJSCallFunction, Operator::kNoProperties, // opcode | 617 IrOpcode::kJSCallFunction, Operator::kNoProperties, // opcode |
610 "JSCallFunction", // name | 618 "JSCallFunction", // name |
611 parameters.arity(), 1, 1, 1, 1, 2, // inputs/outputs | 619 parameters.arity(), 1, 1, 1, 1, 2, // inputs/outputs |
612 parameters); // parameter | 620 parameters); // parameter |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
900 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- | 908 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- |
901 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode | 909 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode |
902 "JSCreateScriptContext", // name | 910 "JSCreateScriptContext", // name |
903 1, 1, 1, 1, 1, 2, // counts | 911 1, 1, 1, 1, 1, 2, // counts |
904 scpope_info); // parameter | 912 scpope_info); // parameter |
905 } | 913 } |
906 | 914 |
907 } // namespace compiler | 915 } // namespace compiler |
908 } // namespace internal | 916 } // namespace internal |
909 } // namespace v8 | 917 } // namespace v8 |
OLD | NEW |