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

Side by Side Diff: src/compiler/code-generator.cc

Issue 1142873005: [turbofan] Fix over-restictive assertion in code generator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | test/mjsunit/regress/regress-crbug-489293.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 10
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 InstructionOperandConverter converter(this, instr); 574 InstructionOperandConverter converter(this, instr);
575 Constant constant = converter.ToConstant(op); 575 Constant constant = converter.ToConstant(op);
576 Handle<Object> constant_object; 576 Handle<Object> constant_object;
577 switch (constant.type()) { 577 switch (constant.type()) {
578 case Constant::kInt32: 578 case Constant::kInt32:
579 DCHECK(type == kMachInt32 || type == kMachUint32 || type == kRepBit); 579 DCHECK(type == kMachInt32 || type == kMachUint32 || type == kRepBit);
580 constant_object = 580 constant_object =
581 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); 581 isolate()->factory()->NewNumberFromInt(constant.ToInt32());
582 break; 582 break;
583 case Constant::kFloat64: 583 case Constant::kFloat64:
584 DCHECK(type == kMachFloat64 || type == kMachAnyTagged || 584 DCHECK((type & (kRepFloat64 | kRepTagged)) != 0);
585 type == kRepTagged || type == (kTypeNumber | kRepTagged) ||
586 type == (kTypeInt32 | kRepTagged) ||
587 type == (kTypeUint32 | kRepTagged));
588 constant_object = isolate()->factory()->NewNumber(constant.ToFloat64()); 585 constant_object = isolate()->factory()->NewNumber(constant.ToFloat64());
589 break; 586 break;
590 case Constant::kHeapObject: 587 case Constant::kHeapObject:
591 DCHECK((type & kRepMask) == kRepTagged); 588 DCHECK((type & kRepMask) == kRepTagged);
592 constant_object = constant.ToHeapObject(); 589 constant_object = constant.ToHeapObject();
593 break; 590 break;
594 default: 591 default:
595 CHECK(false); 592 CHECK(false);
596 } 593 }
597 int literal_id = DefineDeoptimizationLiteral(constant_object); 594 int literal_id = DefineDeoptimizationLiteral(constant_object);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 : masm_(gen->masm()), next_(gen->ools_) { 663 : masm_(gen->masm()), next_(gen->ools_) {
667 gen->ools_ = this; 664 gen->ools_ = this;
668 } 665 }
669 666
670 667
671 OutOfLineCode::~OutOfLineCode() {} 668 OutOfLineCode::~OutOfLineCode() {}
672 669
673 } // namespace compiler 670 } // namespace compiler
674 } // namespace internal 671 } // namespace internal
675 } // namespace v8 672 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-489293.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698