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

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

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. Created 5 years 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/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 zone(), f, nargs, properties, CallDescriptor::kNeedsFrameState); 229 zone(), f, nargs, properties, CallDescriptor::kNeedsFrameState);
230 Node* ref = jsgraph()->ExternalConstant(ExternalReference(f, isolate())); 230 Node* ref = jsgraph()->ExternalConstant(ExternalReference(f, isolate()));
231 Node* arity = jsgraph()->Int32Constant(nargs); 231 Node* arity = jsgraph()->Int32Constant(nargs);
232 node->InsertInput(zone(), 0, jsgraph()->CEntryStubConstant(fun->result_size)); 232 node->InsertInput(zone(), 0, jsgraph()->CEntryStubConstant(fun->result_size));
233 node->InsertInput(zone(), nargs + 1, ref); 233 node->InsertInput(zone(), nargs + 1, ref);
234 node->InsertInput(zone(), nargs + 2, arity); 234 node->InsertInput(zone(), nargs + 2, arity);
235 NodeProperties::ChangeOp(node, common()->Call(desc)); 235 NodeProperties::ChangeOp(node, common()->Call(desc));
236 } 236 }
237 237
238 238
239 void JSGenericLowering::LowerJSUnaryNot(Node* node) {
240 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
241 Callable callable = CodeFactory::ToBoolean(
242 isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL);
243 ReplaceWithStubCall(node, callable,
244 CallDescriptor::kPatchableCallSite | flags);
245 }
246
247
248 void JSGenericLowering::LowerJSTypeOf(Node* node) { 239 void JSGenericLowering::LowerJSTypeOf(Node* node) {
249 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 240 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
250 Callable callable = CodeFactory::Typeof(isolate()); 241 Callable callable = CodeFactory::Typeof(isolate());
251 ReplaceWithStubCall(node, callable, flags); 242 ReplaceWithStubCall(node, callable, flags);
252 } 243 }
253 244
254 245
255 void JSGenericLowering::LowerJSToBoolean(Node* node) { 246 void JSGenericLowering::LowerJSToBoolean(Node* node) {
256 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 247 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
257 Callable callable = 248 Callable callable = CodeFactory::ToBoolean(isolate());
258 CodeFactory::ToBoolean(isolate(), ToBooleanStub::RESULT_AS_ODDBALL);
259 ReplaceWithStubCall(node, callable, 249 ReplaceWithStubCall(node, callable,
260 CallDescriptor::kPatchableCallSite | flags); 250 CallDescriptor::kPatchableCallSite | flags);
261 } 251 }
262 252
263 253
264 void JSGenericLowering::LowerJSToNumber(Node* node) { 254 void JSGenericLowering::LowerJSToNumber(Node* node) {
265 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 255 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
266 Callable callable = CodeFactory::ToNumber(isolate()); 256 Callable callable = CodeFactory::ToNumber(isolate());
267 ReplaceWithStubCall(node, callable, flags); 257 ReplaceWithStubCall(node, callable, flags);
268 } 258 }
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 } 883 }
894 884
895 885
896 MachineOperatorBuilder* JSGenericLowering::machine() const { 886 MachineOperatorBuilder* JSGenericLowering::machine() const {
897 return jsgraph()->machine(); 887 return jsgraph()->machine();
898 } 888 }
899 889
900 } // namespace compiler 890 } // namespace compiler
901 } // namespace internal 891 } // namespace internal
902 } // namespace v8 892 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698