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

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

Issue 520643002: Workaround to avoid generic lowering breaking branches. (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 | no next file » | 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-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph-inl.h" 7 #include "src/compiler/graph-inl.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-aux-data-inl.h" 10 #include "src/compiler/node-aux-data-inl.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 centrystub_constant_.set(CodeConstant(CEntryStub(isolate(), 1).GetCode())); 378 centrystub_constant_.set(CodeConstant(CEntryStub(isolate(), 1).GetCode()));
379 } 379 }
380 PatchInsertInput(node, 0, centrystub_constant_.get()); 380 PatchInsertInput(node, 0, centrystub_constant_.get());
381 PatchInsertInput(node, nargs + 1, ref); 381 PatchInsertInput(node, nargs + 1, ref);
382 PatchInsertInput(node, nargs + 2, arity); 382 PatchInsertInput(node, nargs + 2, arity);
383 PatchOperator(node, common()->Call(desc)); 383 PatchOperator(node, common()->Call(desc));
384 } 384 }
385 385
386 386
387 Node* JSGenericLowering::LowerBranch(Node* node) { 387 Node* JSGenericLowering::LowerBranch(Node* node) {
388 Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), 388 if (!info()->is_typing_enabled()) {
389 jsgraph()->TrueConstant()); 389 // TODO(mstarzinger): If typing is enabled then simplified lowering will
390 node->ReplaceInput(0, test); 390 // have inserted the correct ChangeBoolToBit, otherwise we need to perform
391 // poor-man's representation inference here and insert manual change.
392 Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0),
393 jsgraph()->TrueConstant());
394 node->ReplaceInput(0, test);
395 }
391 return node; 396 return node;
392 } 397 }
393 398
394 399
395 Node* JSGenericLowering::LowerJSUnaryNot(Node* node) { 400 Node* JSGenericLowering::LowerJSUnaryNot(Node* node) {
396 ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL); 401 ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL);
397 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 402 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite);
398 return node; 403 return node;
399 } 404 }
400 405
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { 548 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) {
544 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); 549 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node);
545 int arity = OperatorProperties::GetValueInputCount(node->op()); 550 int arity = OperatorProperties::GetValueInputCount(node->op());
546 ReplaceWithRuntimeCall(node, function, arity); 551 ReplaceWithRuntimeCall(node, function, arity);
547 return node; 552 return node;
548 } 553 }
549 554
550 } // namespace compiler 555 } // namespace compiler
551 } // namespace internal 556 } // namespace internal
552 } // namespace v8 557 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698