OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 Address handler_; // try-blocks are chained through the stack | 60 Address handler_; // try-blocks are chained through the stack |
61 bool stack_is_cooked_; | 61 bool stack_is_cooked_; |
62 inline bool stack_is_cooked() { return stack_is_cooked_; } | 62 inline bool stack_is_cooked() { return stack_is_cooked_; } |
63 inline void set_stack_is_cooked(bool value) { stack_is_cooked_ = value; } | 63 inline void set_stack_is_cooked(bool value) { stack_is_cooked_ = value; } |
64 | 64 |
65 // Generated code scratch locations. | 65 // Generated code scratch locations. |
66 int32_t formal_count_; | 66 int32_t formal_count_; |
67 | 67 |
68 // Call back function to report unsafe JS accesses. | 68 // Call back function to report unsafe JS accesses. |
69 v8::FailedAccessCheckCallback failed_access_check_callback_; | 69 v8::FailedAccessCheckCallback failed_access_check_callback_; |
| 70 |
| 71 // Flag for whether we are currently in a call that the static analysis |
| 72 // marked as a potentially direct eval. |
| 73 bool in_potentially_direct_eval_; |
70 }; | 74 }; |
71 | 75 |
72 #define TOP_ADDRESS_LIST(C) \ | 76 #define TOP_ADDRESS_LIST(C) \ |
73 C(handler_address) \ | 77 C(handler_address) \ |
74 C(c_entry_fp_address) \ | 78 C(c_entry_fp_address) \ |
75 C(context_address) \ | 79 C(context_address) \ |
76 C(pending_exception_address) \ | 80 C(pending_exception_address) \ |
77 C(external_caught_exception_address) | 81 C(external_caught_exception_address) |
78 | 82 |
79 class Top { | 83 class Top { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 static Address c_entry_fp(ThreadLocalTop* thread) { | 162 static Address c_entry_fp(ThreadLocalTop* thread) { |
159 return thread->c_entry_fp_; | 163 return thread->c_entry_fp_; |
160 } | 164 } |
161 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } | 165 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } |
162 | 166 |
163 static inline Address* c_entry_fp_address() { | 167 static inline Address* c_entry_fp_address() { |
164 return &thread_local_.c_entry_fp_; | 168 return &thread_local_.c_entry_fp_; |
165 } | 169 } |
166 static inline Address* handler_address() { return &thread_local_.handler_; } | 170 static inline Address* handler_address() { return &thread_local_.handler_; } |
167 | 171 |
| 172 static inline void set_in_potentially_direct_eval(bool b) { |
| 173 thread_local_.in_potentially_direct_eval_ = b; |
| 174 } |
| 175 |
| 176 static inline bool is_in_potentially_direct_eval() { |
| 177 return thread_local_.in_potentially_direct_eval_; |
| 178 } |
| 179 |
168 // Generated code scratch locations. | 180 // Generated code scratch locations. |
169 static void* formal_count_address() { return &thread_local_.formal_count_; } | 181 static void* formal_count_address() { return &thread_local_.formal_count_; } |
170 | 182 |
171 static void new_break(StackFrame::Id break_frame_id); | 183 static void new_break(StackFrame::Id break_frame_id); |
172 static void set_break(StackFrame::Id break_frame_id, int break_id); | 184 static void set_break(StackFrame::Id break_frame_id, int break_id); |
173 static bool check_break(int break_id); | 185 static bool check_break(int break_id); |
174 static bool is_break(); | 186 static bool is_break(); |
175 static StackFrame::Id break_frame_id(); | 187 static StackFrame::Id break_frame_id(); |
176 static int break_id(); | 188 static int break_id(); |
177 | 189 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 376 |
365 class ExecutionAccess BASE_EMBEDDED { | 377 class ExecutionAccess BASE_EMBEDDED { |
366 public: | 378 public: |
367 ExecutionAccess(); | 379 ExecutionAccess(); |
368 ~ExecutionAccess(); | 380 ~ExecutionAccess(); |
369 }; | 381 }; |
370 | 382 |
371 } } // namespace v8::internal | 383 } } // namespace v8::internal |
372 | 384 |
373 #endif // V8_TOP_H_ | 385 #endif // V8_TOP_H_ |
OLD | NEW |