| 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-factory.h" | 5 #include "src/code-factory.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // static | 229 // static |
| 230 Callable CodeFactory::FastNewClosure(Isolate* isolate, | 230 Callable CodeFactory::FastNewClosure(Isolate* isolate, |
| 231 LanguageMode language_mode, | 231 LanguageMode language_mode, |
| 232 FunctionKind kind) { | 232 FunctionKind kind) { |
| 233 FastNewClosureStub stub(isolate, language_mode, kind); | 233 FastNewClosureStub stub(isolate, language_mode, kind); |
| 234 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 234 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 | 237 |
| 238 // static | 238 // static |
| 239 Callable CodeFactory::ArgumentsAccess(Isolate* isolate, |
| 240 bool is_unmapped_arguments, |
| 241 bool has_duplicate_parameters) { |
| 242 ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType( |
| 243 is_unmapped_arguments, has_duplicate_parameters); |
| 244 ArgumentsAccessStub stub(isolate, type); |
| 245 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 246 } |
| 247 |
| 248 |
| 249 // static |
| 239 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { | 250 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { |
| 240 AllocateHeapNumberStub stub(isolate); | 251 AllocateHeapNumberStub stub(isolate); |
| 241 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 252 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 242 } | 253 } |
| 243 | 254 |
| 244 | 255 |
| 245 // static | 256 // static |
| 246 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 257 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
| 247 CallFunctionFlags flags) { | 258 CallFunctionFlags flags) { |
| 248 CallFunctionStub stub(isolate, argc, flags); | 259 CallFunctionStub stub(isolate, argc, flags); |
| 249 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 260 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 250 } | 261 } |
| 251 | 262 |
| 252 | 263 |
| 253 // static | 264 // static |
| 254 Callable CodeFactory::PushArgsAndCall(Isolate* isolate) { | 265 Callable CodeFactory::PushArgsAndCall(Isolate* isolate) { |
| 255 return Callable(isolate->builtins()->PushArgsAndCall(), | 266 return Callable(isolate->builtins()->PushArgsAndCall(), |
| 256 PushArgsAndCallDescriptor(isolate)); | 267 PushArgsAndCallDescriptor(isolate)); |
| 257 } | 268 } |
| 258 | 269 |
| 259 } // namespace internal | 270 } // namespace internal |
| 260 } // namespace v8 | 271 } // namespace v8 |
| OLD | NEW |