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 #ifndef V8_IC_H_ | 5 #ifndef V8_IC_H_ |
6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
7 | 7 |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 InlineCacheState state = nexus->StateFromFeedback(); | 68 InlineCacheState state = nexus->StateFromFeedback(); |
69 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; | 69 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; |
70 } | 70 } |
71 | 71 |
72 static bool ICUseVector(Code::Kind kind) { | 72 static bool ICUseVector(Code::Kind kind) { |
73 return kind == Code::LOAD_IC || kind == Code::LOAD_GLOBAL_IC || | 73 return kind == Code::LOAD_IC || kind == Code::LOAD_GLOBAL_IC || |
74 kind == Code::KEYED_LOAD_IC || kind == Code::CALL_IC || | 74 kind == Code::KEYED_LOAD_IC || kind == Code::CALL_IC || |
75 kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC; | 75 kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC; |
76 } | 76 } |
77 | 77 |
| 78 // The ICs that don't pass slot and vector through the stack have to |
| 79 // save/restore them in the dispatcher. |
| 80 static bool ShouldPushPopSlotAndVector(Code::Kind kind); |
| 81 |
78 static InlineCacheState StateFromCode(Code* code); | 82 static InlineCacheState StateFromCode(Code* code); |
79 | 83 |
80 protected: | 84 protected: |
81 Address fp() const { return fp_; } | 85 Address fp() const { return fp_; } |
82 Address pc() const { return *pc_address_; } | 86 Address pc() const { return *pc_address_; } |
83 Isolate* isolate() const { return isolate_; } | 87 Isolate* isolate() const { return isolate_; } |
84 | 88 |
85 // Get the shared function info of the caller. | 89 // Get the shared function info of the caller. |
86 SharedFunctionInfo* GetSharedFunctionInfo() const; | 90 SharedFunctionInfo* GetSharedFunctionInfo() const; |
87 // Get the code object of the caller. | 91 // Get the code object of the caller. |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 503 |
500 // Helper for BinaryOpIC and CompareIC. | 504 // Helper for BinaryOpIC and CompareIC. |
501 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 505 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
502 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 506 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
503 InlinedSmiCheck check); | 507 InlinedSmiCheck check); |
504 | 508 |
505 } // namespace internal | 509 } // namespace internal |
506 } // namespace v8 | 510 } // namespace v8 |
507 | 511 |
508 #endif // V8_IC_H_ | 512 #endif // V8_IC_H_ |
OLD | NEW |