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 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 // static | 42 // static |
43 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate) { | 43 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate) { |
44 return Callable(isolate->builtins()->LoadIC(), | 44 return Callable(isolate->builtins()->LoadIC(), |
45 LoadWithVectorDescriptor(isolate)); | 45 LoadWithVectorDescriptor(isolate)); |
46 } | 46 } |
47 | 47 |
48 // static | 48 // static |
49 Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) { | 49 Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) { |
50 LoadGlobalICTrampolineStub stub(isolate, LoadGlobalICState(typeof_mode)); | 50 return Callable( |
51 return make_callable(stub); | 51 typeof_mode == NOT_INSIDE_TYPEOF |
| 52 ? isolate->builtins()->LoadGlobalICTrampoline() |
| 53 : isolate->builtins()->LoadGlobalICInsideTypeofTrampoline(), |
| 54 LoadGlobalDescriptor(isolate)); |
52 } | 55 } |
53 | 56 |
54 // static | 57 // static |
55 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate, | 58 Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate, |
56 TypeofMode typeof_mode) { | 59 TypeofMode typeof_mode) { |
57 LoadGlobalICStub stub(isolate, LoadGlobalICState(typeof_mode)); | 60 return Callable(typeof_mode == NOT_INSIDE_TYPEOF |
58 return make_callable(stub); | 61 ? isolate->builtins()->LoadGlobalIC() |
| 62 : isolate->builtins()->LoadGlobalICInsideTypeof(), |
| 63 LoadGlobalWithVectorDescriptor(isolate)); |
59 } | 64 } |
60 | 65 |
61 // static | 66 // static |
62 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { | 67 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { |
63 return Callable(isolate->builtins()->KeyedLoadICTrampoline(), | 68 return Callable(isolate->builtins()->KeyedLoadICTrampoline(), |
64 LoadDescriptor(isolate)); | 69 LoadDescriptor(isolate)); |
65 } | 70 } |
66 | 71 |
67 // static | 72 // static |
68 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { | 73 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 } | 513 } |
509 | 514 |
510 // static | 515 // static |
511 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) { | 516 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) { |
512 return Callable(isolate->builtins()->FunctionPrototypeBind(), | 517 return Callable(isolate->builtins()->FunctionPrototypeBind(), |
513 BuiltinDescriptor(isolate)); | 518 BuiltinDescriptor(isolate)); |
514 } | 519 } |
515 | 520 |
516 } // namespace internal | 521 } // namespace internal |
517 } // namespace v8 | 522 } // namespace v8 |
OLD | NEW |