OLD | NEW |
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/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
11 #include "src/code-factory.h" | 11 #include "src/code-factory.h" |
| 12 #include "src/crankshaft/hydrogen-bce.h" |
| 13 #include "src/crankshaft/hydrogen-bch.h" |
| 14 #include "src/crankshaft/hydrogen-canonicalize.h" |
| 15 #include "src/crankshaft/hydrogen-check-elimination.h" |
| 16 #include "src/crankshaft/hydrogen-dce.h" |
| 17 #include "src/crankshaft/hydrogen-dehoist.h" |
| 18 #include "src/crankshaft/hydrogen-environment-liveness.h" |
| 19 #include "src/crankshaft/hydrogen-escape-analysis.h" |
| 20 #include "src/crankshaft/hydrogen-gvn.h" |
| 21 #include "src/crankshaft/hydrogen-infer-representation.h" |
| 22 #include "src/crankshaft/hydrogen-infer-types.h" |
| 23 #include "src/crankshaft/hydrogen-load-elimination.h" |
| 24 #include "src/crankshaft/hydrogen-mark-deoptimize.h" |
| 25 #include "src/crankshaft/hydrogen-mark-unreachable.h" |
| 26 #include "src/crankshaft/hydrogen-osr.h" |
| 27 #include "src/crankshaft/hydrogen-range-analysis.h" |
| 28 #include "src/crankshaft/hydrogen-redundant-phi.h" |
| 29 #include "src/crankshaft/hydrogen-removable-simulates.h" |
| 30 #include "src/crankshaft/hydrogen-representation-changes.h" |
| 31 #include "src/crankshaft/hydrogen-sce.h" |
| 32 #include "src/crankshaft/hydrogen-store-elimination.h" |
| 33 #include "src/crankshaft/hydrogen-uint32-analysis.h" |
| 34 #include "src/crankshaft/lithium-allocator.h" |
| 35 #include "src/crankshaft/typing.h" |
12 #include "src/full-codegen/full-codegen.h" | 36 #include "src/full-codegen/full-codegen.h" |
13 #include "src/hydrogen-bce.h" | |
14 #include "src/hydrogen-bch.h" | |
15 #include "src/hydrogen-canonicalize.h" | |
16 #include "src/hydrogen-check-elimination.h" | |
17 #include "src/hydrogen-dce.h" | |
18 #include "src/hydrogen-dehoist.h" | |
19 #include "src/hydrogen-environment-liveness.h" | |
20 #include "src/hydrogen-escape-analysis.h" | |
21 #include "src/hydrogen-gvn.h" | |
22 #include "src/hydrogen-infer-representation.h" | |
23 #include "src/hydrogen-infer-types.h" | |
24 #include "src/hydrogen-load-elimination.h" | |
25 #include "src/hydrogen-mark-deoptimize.h" | |
26 #include "src/hydrogen-mark-unreachable.h" | |
27 #include "src/hydrogen-osr.h" | |
28 #include "src/hydrogen-range-analysis.h" | |
29 #include "src/hydrogen-redundant-phi.h" | |
30 #include "src/hydrogen-removable-simulates.h" | |
31 #include "src/hydrogen-representation-changes.h" | |
32 #include "src/hydrogen-sce.h" | |
33 #include "src/hydrogen-store-elimination.h" | |
34 #include "src/hydrogen-uint32-analysis.h" | |
35 #include "src/ic/call-optimization.h" | 37 #include "src/ic/call-optimization.h" |
36 #include "src/ic/ic.h" | 38 #include "src/ic/ic.h" |
37 // GetRootConstructor | 39 // GetRootConstructor |
38 #include "src/ic/ic-inl.h" | 40 #include "src/ic/ic-inl.h" |
39 #include "src/isolate-inl.h" | 41 #include "src/isolate-inl.h" |
40 #include "src/lithium-allocator.h" | |
41 #include "src/parser.h" | 42 #include "src/parser.h" |
42 #include "src/runtime/runtime.h" | 43 #include "src/runtime/runtime.h" |
43 #include "src/scopeinfo.h" | 44 #include "src/scopeinfo.h" |
44 #include "src/typing.h" | |
45 | 45 |
46 #if V8_TARGET_ARCH_IA32 | 46 #if V8_TARGET_ARCH_IA32 |
47 #include "src/ia32/lithium-codegen-ia32.h" // NOLINT | 47 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" // NOLINT |
48 #elif V8_TARGET_ARCH_X64 | 48 #elif V8_TARGET_ARCH_X64 |
49 #include "src/x64/lithium-codegen-x64.h" // NOLINT | 49 #include "src/crankshaft/x64/lithium-codegen-x64.h" // NOLINT |
50 #elif V8_TARGET_ARCH_ARM64 | 50 #elif V8_TARGET_ARCH_ARM64 |
51 #include "src/arm64/lithium-codegen-arm64.h" // NOLINT | 51 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" // NOLINT |
52 #elif V8_TARGET_ARCH_ARM | 52 #elif V8_TARGET_ARCH_ARM |
53 #include "src/arm/lithium-codegen-arm.h" // NOLINT | 53 #include "src/crankshaft/arm/lithium-codegen-arm.h" // NOLINT |
54 #elif V8_TARGET_ARCH_PPC | 54 #elif V8_TARGET_ARCH_PPC |
55 #include "src/ppc/lithium-codegen-ppc.h" // NOLINT | 55 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" // NOLINT |
56 #elif V8_TARGET_ARCH_MIPS | 56 #elif V8_TARGET_ARCH_MIPS |
57 #include "src/mips/lithium-codegen-mips.h" // NOLINT | 57 #include "src/crankshaft/mips/lithium-codegen-mips.h" // NOLINT |
58 #elif V8_TARGET_ARCH_MIPS64 | 58 #elif V8_TARGET_ARCH_MIPS64 |
59 #include "src/mips64/lithium-codegen-mips64.h" // NOLINT | 59 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" // NOLINT |
60 #elif V8_TARGET_ARCH_X87 | 60 #elif V8_TARGET_ARCH_X87 |
61 #include "src/x87/lithium-codegen-x87.h" // NOLINT | 61 #include "src/crankshaft/x87/lithium-codegen-x87.h" // NOLINT |
62 #else | 62 #else |
63 #error Unsupported target architecture. | 63 #error Unsupported target architecture. |
64 #endif | 64 #endif |
65 | 65 |
66 namespace v8 { | 66 namespace v8 { |
67 namespace internal { | 67 namespace internal { |
68 | 68 |
69 HBasicBlock::HBasicBlock(HGraph* graph) | 69 HBasicBlock::HBasicBlock(HGraph* graph) |
70 : block_id_(graph->GetNextBlockID()), | 70 : block_id_(graph->GetNextBlockID()), |
71 graph_(graph), | 71 graph_(graph), |
(...skipping 4350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 void HOptimizedGraphBuilder::VisitForTypeOf(Expression* expr) { | 4422 void HOptimizedGraphBuilder::VisitForTypeOf(Expression* expr) { |
4423 ValueContext for_value(this, ARGUMENTS_NOT_ALLOWED); | 4423 ValueContext for_value(this, ARGUMENTS_NOT_ALLOWED); |
4424 for_value.set_typeof_mode(INSIDE_TYPEOF); | 4424 for_value.set_typeof_mode(INSIDE_TYPEOF); |
4425 Visit(expr); | 4425 Visit(expr); |
4426 } | 4426 } |
4427 | 4427 |
4428 | 4428 |
4429 void HOptimizedGraphBuilder::VisitForControl(Expression* expr, | 4429 void HOptimizedGraphBuilder::VisitForControl(Expression* expr, |
4430 HBasicBlock* true_block, | 4430 HBasicBlock* true_block, |
4431 HBasicBlock* false_block) { | 4431 HBasicBlock* false_block) { |
4432 TestContext for_test(this, expr, true_block, false_block); | 4432 TestContext for_control(this, expr, true_block, false_block); |
4433 Visit(expr); | 4433 Visit(expr); |
4434 } | 4434 } |
4435 | 4435 |
4436 | 4436 |
4437 void HOptimizedGraphBuilder::VisitExpressions( | 4437 void HOptimizedGraphBuilder::VisitExpressions( |
4438 ZoneList<Expression*>* exprs) { | 4438 ZoneList<Expression*>* exprs) { |
4439 for (int i = 0; i < exprs->length(); ++i) { | 4439 for (int i = 0; i < exprs->length(); ++i) { |
4440 CHECK_ALIVE(VisitForValue(exprs->at(i))); | 4440 CHECK_ALIVE(VisitForValue(exprs->at(i))); |
4441 } | 4441 } |
4442 } | 4442 } |
(...skipping 9234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13677 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13677 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13678 } | 13678 } |
13679 | 13679 |
13680 #ifdef DEBUG | 13680 #ifdef DEBUG |
13681 graph_->Verify(false); // No full verify. | 13681 graph_->Verify(false); // No full verify. |
13682 #endif | 13682 #endif |
13683 } | 13683 } |
13684 | 13684 |
13685 } // namespace internal | 13685 } // namespace internal |
13686 } // namespace v8 | 13686 } // namespace v8 |
OLD | NEW |