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

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

Issue 530973002: Lower simplified StringAdd to stub call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/simplified-lowering.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/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/graph-inl.h" 6 #include "src/compiler/graph-inl.h"
7 #include "src/compiler/js-typed-lowering.h" 7 #include "src/compiler/js-typed-lowering.h"
8 #include "src/compiler/node-aux-data-inl.h" 8 #include "src/compiler/node-aux-data-inl.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/types.h" 10 #include "src/types.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 NodeProperties::ReplaceEffectInput(node_, effect); 215 NodeProperties::ReplaceEffectInput(node_, effect);
216 } 216 }
217 }; 217 };
218 218
219 219
220 Reduction JSTypedLowering::ReduceJSAdd(Node* node) { 220 Reduction JSTypedLowering::ReduceJSAdd(Node* node) {
221 JSBinopReduction r(this, node); 221 JSBinopReduction r(this, node);
222 if (r.OneInputIs(Type::String())) { 222 if (r.OneInputIs(Type::String())) {
223 r.ConvertInputsToString(); 223 r.ConvertInputsToString();
224 return r.ChangeToPureOperator(simplified()->StringAdd()); 224 return r.ChangeToPureOperator(simplified()->StringAdd());
225 } else if (r.NeitherInputCanBe(Type::String())) { 225 }
226 if (r.NeitherInputCanBe(Type::String())) {
226 r.ConvertInputsToNumber(); 227 r.ConvertInputsToNumber();
227 return r.ChangeToPureOperator(simplified()->NumberAdd()); 228 return r.ChangeToPureOperator(simplified()->NumberAdd());
228 } 229 }
229 return NoChange(); 230 return NoChange();
230 } 231 }
231 232
232 233
233 Reduction JSTypedLowering::ReduceNumberBinop(Node* node, Operator* numberOp) { 234 Reduction JSTypedLowering::ReduceNumberBinop(Node* node, Operator* numberOp) {
234 JSBinopReduction r(this, node); 235 JSBinopReduction r(this, node);
235 if (r.OneInputIs(Type::Primitive())) { 236 if (r.OneInputIs(Type::Primitive())) {
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 case IrOpcode::kJSLoadProperty: 615 case IrOpcode::kJSLoadProperty:
615 return ReduceJSPropertyLoad(node); 616 return ReduceJSPropertyLoad(node);
616 default: 617 default:
617 break; 618 break;
618 } 619 }
619 return NoChange(); 620 return NoChange();
620 } 621 }
621 } 622 }
622 } 623 }
623 } // namespace v8::internal::compiler 624 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | src/compiler/simplified-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698