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

Side by Side Diff: src/compiler/verifier.cc

Issue 2692753004: [turbofan] escape analysis supports arguments object and rest elements (Closed)
Patch Set: handle the case where Deoptimizer::function_ is a Smi Created 3 years, 9 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/compiler/typer.cc ('k') | src/deoptimizer.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/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
11 #include <string> 11 #include <string>
12 12
13 #include "src/bit-vector.h" 13 #include "src/bit-vector.h"
14 #include "src/compiler/all-nodes.h" 14 #include "src/compiler/all-nodes.h"
15 #include "src/compiler/common-operator.h" 15 #include "src/compiler/common-operator.h"
16 #include "src/compiler/graph.h" 16 #include "src/compiler/graph.h"
17 #include "src/compiler/js-operator.h" 17 #include "src/compiler/js-operator.h"
18 #include "src/compiler/node-properties.h" 18 #include "src/compiler/node-properties.h"
19 #include "src/compiler/node.h" 19 #include "src/compiler/node.h"
20 #include "src/compiler/opcodes.h" 20 #include "src/compiler/opcodes.h"
21 #include "src/compiler/operator-properties.h" 21 #include "src/compiler/operator-properties.h"
22 #include "src/compiler/operator.h" 22 #include "src/compiler/operator.h"
23 #include "src/compiler/schedule.h" 23 #include "src/compiler/schedule.h"
24 #include "src/compiler/simplified-operator.h" 24 #include "src/compiler/simplified-operator.h"
25 #include "src/compiler/type-cache.h"
25 #include "src/ostreams.h" 26 #include "src/ostreams.h"
26 27
27 namespace v8 { 28 namespace v8 {
28 namespace internal { 29 namespace internal {
29 namespace compiler { 30 namespace compiler {
30 31
31 32
32 class Verifier::Visitor { 33 class Verifier::Visitor {
33 public: 34 public:
34 Visitor(Zone* z, Typing typed, CheckInputs check_inputs) 35 Visitor(Zone* z, Typing typed, CheckInputs check_inputs)
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 for (int i = 0; i < 3; ++i) { 490 for (int i = 0; i < 3; ++i) {
490 CHECK(NodeProperties::GetValueInput(node, i)->opcode() == 491 CHECK(NodeProperties::GetValueInput(node, i)->opcode() ==
491 IrOpcode::kStateValues || 492 IrOpcode::kStateValues ||
492 NodeProperties::GetValueInput(node, i)->opcode() == 493 NodeProperties::GetValueInput(node, i)->opcode() ==
493 IrOpcode::kTypedStateValues); 494 IrOpcode::kTypedStateValues);
494 } 495 }
495 break; 496 break;
496 } 497 }
497 case IrOpcode::kStateValues: 498 case IrOpcode::kStateValues:
498 case IrOpcode::kTypedStateValues: 499 case IrOpcode::kTypedStateValues:
499 case IrOpcode::kArgumentsObjectState: 500 case IrOpcode::kArgumentsElementsState:
500 case IrOpcode::kObjectState: 501 case IrOpcode::kObjectState:
501 case IrOpcode::kTypedObjectState: 502 case IrOpcode::kTypedObjectState:
502 // TODO(jarin): what are the constraints on these? 503 // TODO(jarin): what are the constraints on these?
503 break; 504 break;
504 case IrOpcode::kCall: 505 case IrOpcode::kCall:
505 // TODO(rossberg): what are the constraints on these? 506 // TODO(rossberg): what are the constraints on these?
506 break; 507 break;
507 case IrOpcode::kTailCall: 508 case IrOpcode::kTailCall:
508 // TODO(bmeurer): what are the constraints on these? 509 // TODO(bmeurer): what are the constraints on these?
509 break; 510 break;
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 case IrOpcode::kObjectIsNonCallable: 957 case IrOpcode::kObjectIsNonCallable:
957 case IrOpcode::kObjectIsNumber: 958 case IrOpcode::kObjectIsNumber:
958 case IrOpcode::kObjectIsReceiver: 959 case IrOpcode::kObjectIsReceiver:
959 case IrOpcode::kObjectIsSmi: 960 case IrOpcode::kObjectIsSmi:
960 case IrOpcode::kObjectIsString: 961 case IrOpcode::kObjectIsString:
961 case IrOpcode::kObjectIsUndetectable: 962 case IrOpcode::kObjectIsUndetectable:
962 case IrOpcode::kArrayBufferWasNeutered: 963 case IrOpcode::kArrayBufferWasNeutered:
963 CheckValueInputIs(node, 0, Type::Any()); 964 CheckValueInputIs(node, 0, Type::Any());
964 CheckTypeIs(node, Type::Boolean()); 965 CheckTypeIs(node, Type::Boolean());
965 break; 966 break;
966 case IrOpcode::kNewRestParameterElements: 967 case IrOpcode::kArgumentsLength:
968 CheckValueInputIs(node, 0, Type::ExternalPointer());
969 CheckTypeIs(node, TypeCache::Get().kArgumentsLengthType);
970 break;
971 case IrOpcode::kArgumentsFrame:
972 CheckTypeIs(node, Type::ExternalPointer());
973 break;
967 case IrOpcode::kNewUnmappedArgumentsElements: 974 case IrOpcode::kNewUnmappedArgumentsElements:
975 CheckValueInputIs(node, 0, Type::ExternalPointer());
976 CheckValueInputIs(node, 1, Type::Range(-Code::kMaxArguments,
977 Code::kMaxArguments, zone));
968 CheckTypeIs(node, Type::OtherInternal()); 978 CheckTypeIs(node, Type::OtherInternal());
969 break; 979 break;
970 case IrOpcode::kAllocate: 980 case IrOpcode::kAllocate:
971 CheckValueInputIs(node, 0, Type::PlainNumber()); 981 CheckValueInputIs(node, 0, Type::PlainNumber());
972 break; 982 break;
973 case IrOpcode::kEnsureWritableFastElements: 983 case IrOpcode::kEnsureWritableFastElements:
974 CheckValueInputIs(node, 0, Type::Any()); 984 CheckValueInputIs(node, 0, Type::Any());
975 CheckValueInputIs(node, 1, Type::Internal()); 985 CheckValueInputIs(node, 1, Type::Internal());
976 CheckTypeIs(node, Type::Internal()); 986 CheckTypeIs(node, Type::Internal());
977 break; 987 break;
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 replacement->op()->EffectOutputCount() > 0); 1722 replacement->op()->EffectOutputCount() > 0);
1713 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1723 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1714 replacement->opcode() == IrOpcode::kFrameState); 1724 replacement->opcode() == IrOpcode::kFrameState);
1715 } 1725 }
1716 1726
1717 #endif // DEBUG 1727 #endif // DEBUG
1718 1728
1719 } // namespace compiler 1729 } // namespace compiler
1720 } // namespace internal 1730 } // namespace internal
1721 } // namespace v8 1731 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698