| 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 11 matching lines...) Expand all Loading... |
| 22 Node* JSGraph::AllocateInOldSpaceStubConstant() { | 22 Node* JSGraph::AllocateInOldSpaceStubConstant() { |
| 23 return CACHED(kAllocateInOldSpaceStubConstant, | 23 return CACHED(kAllocateInOldSpaceStubConstant, |
| 24 HeapConstant(isolate()->builtins()->AllocateInOldSpace())); | 24 HeapConstant(isolate()->builtins()->AllocateInOldSpace())); |
| 25 } | 25 } |
| 26 | 26 |
| 27 Node* JSGraph::ToNumberBuiltinConstant() { | 27 Node* JSGraph::ToNumberBuiltinConstant() { |
| 28 return CACHED(kToNumberBuiltinConstant, | 28 return CACHED(kToNumberBuiltinConstant, |
| 29 HeapConstant(isolate()->builtins()->ToNumber())); | 29 HeapConstant(isolate()->builtins()->ToNumber())); |
| 30 } | 30 } |
| 31 | 31 |
| 32 Node* JSGraph::CEntryStubConstant(int result_size) { | 32 Node* JSGraph::CEntryStubConstant(int result_size, SaveFPRegsMode save_doubles, |
| 33 if (result_size == 1) { | 33 ArgvMode argv_mode, bool builtin_exit_frame) { |
| 34 return CACHED(kCEntryStubConstant, | 34 if (save_doubles == kDontSaveFPRegs && argv_mode == kArgvOnStack && |
| 35 HeapConstant(CEntryStub(isolate(), 1).GetCode())); | 35 result_size == 1) { |
| 36 CachedNode key = builtin_exit_frame |
| 37 ? kCEntryStubWithBuiltinExitFrameConstant |
| 38 : kCEntryStubConstant; |
| 39 return CACHED(key, |
| 40 HeapConstant(CEntryStub(isolate(), result_size, save_doubles, |
| 41 argv_mode, builtin_exit_frame) |
| 42 .GetCode())); |
| 36 } | 43 } |
| 37 return HeapConstant(CEntryStub(isolate(), result_size).GetCode()); | 44 CEntryStub stub(isolate(), result_size, save_doubles, argv_mode, |
| 45 builtin_exit_frame); |
| 46 return HeapConstant(stub.GetCode()); |
| 38 } | 47 } |
| 39 | 48 |
| 40 | |
| 41 Node* JSGraph::EmptyFixedArrayConstant() { | 49 Node* JSGraph::EmptyFixedArrayConstant() { |
| 42 return CACHED(kEmptyFixedArrayConstant, | 50 return CACHED(kEmptyFixedArrayConstant, |
| 43 HeapConstant(factory()->empty_fixed_array())); | 51 HeapConstant(factory()->empty_fixed_array())); |
| 44 } | 52 } |
| 45 | 53 |
| 46 Node* JSGraph::EmptyLiteralsArrayConstant() { | 54 Node* JSGraph::EmptyLiteralsArrayConstant() { |
| 47 return CACHED(kEmptyLiteralsArrayConstant, | 55 return CACHED(kEmptyLiteralsArrayConstant, |
| 48 HeapConstant(factory()->empty_literals_array())); | 56 HeapConstant(factory()->empty_literals_array())); |
| 49 } | 57 } |
| 50 | 58 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { | 270 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { |
| 263 if (Node* node = cached_nodes_[i]) { | 271 if (Node* node = cached_nodes_[i]) { |
| 264 if (!node->IsDead()) nodes->push_back(node); | 272 if (!node->IsDead()) nodes->push_back(node); |
| 265 } | 273 } |
| 266 } | 274 } |
| 267 } | 275 } |
| 268 | 276 |
| 269 } // namespace compiler | 277 } // namespace compiler |
| 270 } // namespace internal | 278 } // namespace internal |
| 271 } // namespace v8 | 279 } // namespace v8 |
| OLD | NEW |