OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
11 #include "src/factory.h" | 11 #include "src/factory.h" |
12 #include "src/gdb-jit.h" | 12 #include "src/gdb-jit.h" |
13 #include "src/ic/handler-compiler.h" | 13 #include "src/ic/handler-compiler.h" |
14 #include "src/ic/ic.h" | 14 #include "src/ic/ic.h" |
15 #include "src/macro-assembler.h" | 15 #include "src/macro-assembler.h" |
16 #include "src/parser.h" | 16 #include "src/parser.h" |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 | 21 |
| 22 RUNTIME_FUNCTION(UnexpectedStubMiss) { |
| 23 FATAL("Unexpected deopt of a stub"); |
| 24 return Smi::FromInt(0); |
| 25 } |
| 26 |
| 27 |
22 CodeStubDescriptor::CodeStubDescriptor(CodeStub* stub) | 28 CodeStubDescriptor::CodeStubDescriptor(CodeStub* stub) |
23 : call_descriptor_(stub->GetCallInterfaceDescriptor()), | 29 : call_descriptor_(stub->GetCallInterfaceDescriptor()), |
24 stack_parameter_count_(no_reg), | 30 stack_parameter_count_(no_reg), |
25 hint_stack_parameter_count_(-1), | 31 hint_stack_parameter_count_(-1), |
26 function_mode_(NOT_JS_FUNCTION_STUB_MODE), | 32 function_mode_(NOT_JS_FUNCTION_STUB_MODE), |
27 deoptimization_handler_(NULL), | 33 deoptimization_handler_(NULL), |
28 handler_arguments_mode_(DONT_PASS_ARGUMENTS), | 34 handler_arguments_mode_(DONT_PASS_ARGUMENTS), |
29 miss_handler_(), | 35 miss_handler_(), |
30 has_miss_handler_(false) { | 36 has_miss_handler_(false) { |
31 stub->InitializeDescriptor(this); | 37 stub->InitializeDescriptor(this); |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 void CreateWeakCellStub::InitializeDescriptor(CodeStubDescriptor* d) {} | 719 void CreateWeakCellStub::InitializeDescriptor(CodeStubDescriptor* d) {} |
714 | 720 |
715 | 721 |
716 void RegExpConstructResultStub::InitializeDescriptor( | 722 void RegExpConstructResultStub::InitializeDescriptor( |
717 CodeStubDescriptor* descriptor) { | 723 CodeStubDescriptor* descriptor) { |
718 descriptor->Initialize( | 724 descriptor->Initialize( |
719 Runtime::FunctionForId(Runtime::kRegExpConstructResultRT)->entry); | 725 Runtime::FunctionForId(Runtime::kRegExpConstructResultRT)->entry); |
720 } | 726 } |
721 | 727 |
722 | 728 |
| 729 void LoadGlobalViaContextStub::InitializeDescriptor( |
| 730 CodeStubDescriptor* descriptor) { |
| 731 // Must never deoptimize. |
| 732 descriptor->Initialize(FUNCTION_ADDR(UnexpectedStubMiss)); |
| 733 } |
| 734 |
| 735 |
| 736 void StoreGlobalViaContextStub::InitializeDescriptor( |
| 737 CodeStubDescriptor* descriptor) { |
| 738 // Must never deoptimize. |
| 739 descriptor->Initialize(FUNCTION_ADDR(UnexpectedStubMiss)); |
| 740 } |
| 741 |
| 742 |
723 void TransitionElementsKindStub::InitializeDescriptor( | 743 void TransitionElementsKindStub::InitializeDescriptor( |
724 CodeStubDescriptor* descriptor) { | 744 CodeStubDescriptor* descriptor) { |
725 descriptor->Initialize( | 745 descriptor->Initialize( |
726 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); | 746 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); |
727 } | 747 } |
728 | 748 |
729 | 749 |
730 void AllocateHeapNumberStub::InitializeDescriptor( | 750 void AllocateHeapNumberStub::InitializeDescriptor( |
731 CodeStubDescriptor* descriptor) { | 751 CodeStubDescriptor* descriptor) { |
732 descriptor->Initialize( | 752 descriptor->Initialize( |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 | 1081 |
1062 if (type->Is(Type::UntaggedPointer())) { | 1082 if (type->Is(Type::UntaggedPointer())) { |
1063 return Representation::External(); | 1083 return Representation::External(); |
1064 } | 1084 } |
1065 | 1085 |
1066 DCHECK(!type->Is(Type::Untagged())); | 1086 DCHECK(!type->Is(Type::Untagged())); |
1067 return Representation::Tagged(); | 1087 return Representation::Tagged(); |
1068 } | 1088 } |
1069 } // namespace internal | 1089 } // namespace internal |
1070 } // namespace v8 | 1090 } // namespace v8 |
OLD | NEW |