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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2946893004: [WIP] Start adding JSCallWithVarargs
Patch Set: REBASE Created 3 years, 6 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
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 SetOutput(node, MachineRepresentation::kWord32); 1546 SetOutput(node, MachineRepresentation::kWord32);
1547 if (lower()) lowering->DoJSToNumberTruncatesToWord32(node, this); 1547 if (lower()) lowering->DoJSToNumberTruncatesToWord32(node, this);
1548 } else if (truncation.IsUsedAsFloat64()) { 1548 } else if (truncation.IsUsedAsFloat64()) {
1549 SetOutput(node, MachineRepresentation::kFloat64); 1549 SetOutput(node, MachineRepresentation::kFloat64);
1550 if (lower()) lowering->DoJSToNumberTruncatesToFloat64(node, this); 1550 if (lower()) lowering->DoJSToNumberTruncatesToFloat64(node, this);
1551 } else { 1551 } else {
1552 SetOutput(node, MachineRepresentation::kTagged); 1552 SetOutput(node, MachineRepresentation::kTagged);
1553 } 1553 }
1554 return; 1554 return;
1555 } 1555 }
1556 case IrOpcode::kJSCallVarargs: {
1557 CallVarargsParameters p = CallVarargsParametersOf(node->op());
1558 int arity = static_cast<int>(p.arity());
1559 for (int i = 0; i < arity; ++i) {
1560 ProcessInput(node, i, UseInfo::AnyTagged());
1561 }
1562 // argumentsList and argumentsLength
1563 ProcessInput(node, arity + 0, UseInfo::TaggedPointer());
1564 ProcessInput(node, arity + 1, UseInfo::TruncatingWord32());
1565 ProcessRemainingInputs(node, arity + 2);
1566 SetOutput(node, MachineRepresentation::kTagged);
1567 return;
1568 }
1556 1569
1557 //------------------------------------------------------------------ 1570 //------------------------------------------------------------------
1558 // Simplified operators. 1571 // Simplified operators.
1559 //------------------------------------------------------------------ 1572 //------------------------------------------------------------------
1560 case IrOpcode::kBooleanNot: { 1573 case IrOpcode::kBooleanNot: {
1561 if (lower()) { 1574 if (lower()) {
1562 NodeInfo* input_info = GetInfo(node->InputAt(0)); 1575 NodeInfo* input_info = GetInfo(node->InputAt(0));
1563 if (input_info->representation() == MachineRepresentation::kBit) { 1576 if (input_info->representation() == MachineRepresentation::kBit) {
1564 // BooleanNot(x: kRepBit) => Word32Equal(x, #0) 1577 // BooleanNot(x: kRepBit) => Word32Equal(x, #0)
1565 node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0)); 1578 node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0));
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 JS_OBJECT_OP_LIST(OPCODE_CASE) 2904 JS_OBJECT_OP_LIST(OPCODE_CASE)
2892 JS_CONTEXT_OP_LIST(OPCODE_CASE) 2905 JS_CONTEXT_OP_LIST(OPCODE_CASE)
2893 JS_OTHER_OP_LIST(OPCODE_CASE) 2906 JS_OTHER_OP_LIST(OPCODE_CASE)
2894 #undef OPCODE_CASE 2907 #undef OPCODE_CASE
2895 case IrOpcode::kJSToInteger: 2908 case IrOpcode::kJSToInteger:
2896 case IrOpcode::kJSToLength: 2909 case IrOpcode::kJSToLength:
2897 case IrOpcode::kJSToName: 2910 case IrOpcode::kJSToName:
2898 case IrOpcode::kJSToObject: 2911 case IrOpcode::kJSToObject:
2899 case IrOpcode::kJSToString: 2912 case IrOpcode::kJSToString:
2900 case IrOpcode::kJSToPrimitiveToString: 2913 case IrOpcode::kJSToPrimitiveToString:
2914 case IrOpcode::kJSConstruct:
2915 case IrOpcode::kJSConstructForwardVarargs:
2916 case IrOpcode::kJSConstructWithSpread:
2917 case IrOpcode::kJSCall:
2918 case IrOpcode::kJSCallForwardVarargs:
2919 case IrOpcode::kJSCallWithArrayLike:
2920 case IrOpcode::kJSCallWithSpread:
2921 case IrOpcode::kJSCallRuntime:
2901 VisitInputs(node); 2922 VisitInputs(node);
2902 // Assume the output is tagged. 2923 // Assume the output is tagged.
2903 return SetOutput(node, MachineRepresentation::kTagged); 2924 return SetOutput(node, MachineRepresentation::kTagged);
2904 2925
2905 default: 2926 default:
2906 V8_Fatal( 2927 V8_Fatal(
2907 __FILE__, __LINE__, 2928 __FILE__, __LINE__,
2908 "Representation inference: unsupported opcode %i (%s), node #%i\n.", 2929 "Representation inference: unsupported opcode %i (%s), node #%i\n.",
2909 node->opcode(), node->op()->mnemonic(), node->id()); 2930 node->opcode(), node->op()->mnemonic(), node->id());
2910 break; 2931 break;
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3742 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3763 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3743 Operator::kNoProperties); 3764 Operator::kNoProperties);
3744 to_number_operator_.set(common()->Call(desc)); 3765 to_number_operator_.set(common()->Call(desc));
3745 } 3766 }
3746 return to_number_operator_.get(); 3767 return to_number_operator_.get();
3747 } 3768 }
3748 3769
3749 } // namespace compiler 3770 } // namespace compiler
3750 } // namespace internal 3771 } // namespace internal
3751 } // namespace v8 3772 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698