OLD | NEW |
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/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/compiler/typer.h" | 8 #include "src/compiler/typer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 Node* JSGraph::CEntryStubConstant(int result_size) { | 24 Node* JSGraph::CEntryStubConstant(int result_size) { |
25 if (result_size == 1) { | 25 if (result_size == 1) { |
26 return CACHED(kCEntryStubConstant, | 26 return CACHED(kCEntryStubConstant, |
27 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode())); | 27 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode())); |
28 } | 28 } |
29 return ImmovableHeapConstant(CEntryStub(isolate(), result_size).GetCode()); | 29 return ImmovableHeapConstant(CEntryStub(isolate(), result_size).GetCode()); |
30 } | 30 } |
31 | 31 |
32 | 32 |
| 33 Node* JSGraph::EmptyFixedArrayConstant() { |
| 34 return CACHED(kEmptyFixedArrayConstant, |
| 35 ImmovableHeapConstant(factory()->empty_fixed_array())); |
| 36 } |
| 37 |
| 38 |
33 Node* JSGraph::UndefinedConstant() { | 39 Node* JSGraph::UndefinedConstant() { |
34 return CACHED(kUndefinedConstant, | 40 return CACHED(kUndefinedConstant, |
35 ImmovableHeapConstant(factory()->undefined_value())); | 41 ImmovableHeapConstant(factory()->undefined_value())); |
36 } | 42 } |
37 | 43 |
38 | 44 |
39 Node* JSGraph::TheHoleConstant() { | 45 Node* JSGraph::TheHoleConstant() { |
40 return CACHED(kTheHoleConstant, | 46 return CACHED(kTheHoleConstant, |
41 ImmovableHeapConstant(factory()->the_hole_value())); | 47 ImmovableHeapConstant(factory()->the_hole_value())); |
42 } | 48 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { | 208 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { |
203 if (Node* node = cached_nodes_[i]) { | 209 if (Node* node = cached_nodes_[i]) { |
204 if (!node->IsDead()) nodes->push_back(node); | 210 if (!node->IsDead()) nodes->push_back(node); |
205 } | 211 } |
206 } | 212 } |
207 } | 213 } |
208 | 214 |
209 } // namespace compiler | 215 } // namespace compiler |
210 } // namespace internal | 216 } // namespace internal |
211 } // namespace v8 | 217 } // namespace v8 |
OLD | NEW |