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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1130283002: [strong] Disallow implicit conversions for comparison (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 7 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/code-stubs.h ('k') | src/compiler/js-typed-lowering.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static CallDescriptor::Flags FlagsForNode(Node* node) { 109 static CallDescriptor::Flags FlagsForNode(Node* node) {
110 CallDescriptor::Flags result = CallDescriptor::kNoFlags; 110 CallDescriptor::Flags result = CallDescriptor::kNoFlags;
111 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) { 111 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) {
112 result |= CallDescriptor::kNeedsFrameState; 112 result |= CallDescriptor::kNeedsFrameState;
113 } 113 }
114 return result; 114 return result;
115 } 115 }
116 116
117 117
118 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) { 118 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) {
119 Callable callable = CodeFactory::CompareIC(isolate(), token); 119 Callable callable =
120 CodeFactory::CompareIC(isolate(), token, OpParameter<LanguageMode>(node));
120 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( 121 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor(
121 isolate(), zone(), callable.descriptor(), 0, 122 isolate(), zone(), callable.descriptor(), 0,
122 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), 123 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node),
123 Operator::kNoProperties, kMachIntPtr); 124 Operator::kNoProperties, kMachIntPtr);
124 125
125 // Create a new call node asking a CompareIC for help. 126 // Create a new call node asking a CompareIC for help.
126 NodeVector inputs(zone()); 127 NodeVector inputs(zone());
127 inputs.reserve(node->InputCount() + 1); 128 inputs.reserve(node->InputCount() + 1);
128 inputs.push_back(jsgraph()->HeapConstant(callable.code())); 129 inputs.push_back(jsgraph()->HeapConstant(callable.code()));
129 inputs.push_back(NodeProperties::GetValueInput(node, 0)); 130 inputs.push_back(NodeProperties::GetValueInput(node, 0));
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 576 }
576 577
577 578
578 MachineOperatorBuilder* JSGenericLowering::machine() const { 579 MachineOperatorBuilder* JSGenericLowering::machine() const {
579 return jsgraph()->machine(); 580 return jsgraph()->machine();
580 } 581 }
581 582
582 } // namespace compiler 583 } // namespace compiler
583 } // namespace internal 584 } // namespace internal
584 } // namespace v8 585 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698