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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1153 it.Advance(); | 1153 it.Advance(); |
1154 } | 1154 } |
1155 fp = it.frame()->fp(); | 1155 fp = it.frame()->fp(); |
1156 } | 1156 } |
1157 | 1157 |
1158 // Flood the function with one-shot break points if it is called from where | 1158 // Flood the function with one-shot break points if it is called from where |
1159 // step into was requested. | 1159 // step into was requested. |
1160 if (fp == Debug::step_in_fp()) { | 1160 if (fp == Debug::step_in_fp()) { |
1161 // Don't allow step into functions in the native context. | 1161 // Don't allow step into functions in the native context. |
1162 if (function->context()->global() != Top::context()->builtins()) { | 1162 if (function->context()->global() != Top::context()->builtins()) { |
1163 if (function->shared()->code() == | 1163 if (function->shared()->code() == |
Kasper Lund
2009/04/07 12:15:14
How about caching function->shared()->code() in a
| |
1164 Builtins::builtin(Builtins::FunctionApply)) { | 1164 Builtins::builtin(Builtins::FunctionApply) || |
1165 // Handle function.apply separately to flood the function to be called | 1165 function->shared()->code() == |
1166 // and not the code for Builtins::FunctionApply. At the point of the | 1166 Builtins::builtin(Builtins::FunctionCall)) { |
1167 // call IC to call Builtins::FunctionApply the expression stack has the | 1167 // Handle function.apply and function.call separately to flood the |
1168 // following content: | 1168 // function to be called and not the code for Builtins::FunctionApply or |
1169 // symbol "apply" | 1169 // Builtins::FunctionCall. At the point of the call IC to call either |
1170 // function apply was called on | 1170 // Builtins::FunctionApply or Builtins::FunctionCall the expression |
1171 // receiver for apply (first parameter to apply) | 1171 // stack has the following content: |
1172 // arguments array for apply (second parameter to apply) | 1172 // symbol "apply" or "call" |
1173 // function apply or call was called on | |
1174 // receiver for apply or call (first parameter to apply or call) | |
1175 // ... further arguments to apply or call. | |
1173 JavaScriptFrameIterator it; | 1176 JavaScriptFrameIterator it; |
1174 ASSERT(it.frame()->fp() == fp); | 1177 ASSERT(it.frame()->fp() == fp); |
1175 ASSERT(it.frame()->GetExpression(1)->IsJSFunction()); | 1178 ASSERT(it.frame()->GetExpression(1)->IsJSFunction()); |
1176 if (it.frame()->GetExpression(1)->IsJSFunction()) { | 1179 if (it.frame()->GetExpression(1)->IsJSFunction()) { |
1177 Handle<JSFunction> | 1180 Handle<JSFunction> |
1178 actual_function(JSFunction::cast(it.frame()->GetExpression(1))); | 1181 actual_function(JSFunction::cast(it.frame()->GetExpression(1))); |
1179 Handle<SharedFunctionInfo> actual_shared(actual_function->shared()); | 1182 Handle<SharedFunctionInfo> actual_shared(actual_function->shared()); |
1180 Debug::FloodWithOneShot(actual_shared); | 1183 Debug::FloodWithOneShot(actual_shared); |
1181 } | 1184 } |
1182 } else { | 1185 } else { |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2205 } | 2208 } |
2206 | 2209 |
2207 | 2210 |
2208 void LockingMessageQueue::Clear() { | 2211 void LockingMessageQueue::Clear() { |
2209 ScopedLock sl(lock_); | 2212 ScopedLock sl(lock_); |
2210 queue_.Clear(); | 2213 queue_.Clear(); |
2211 } | 2214 } |
2212 | 2215 |
2213 | 2216 |
2214 } } // namespace v8::internal | 2217 } } // namespace v8::internal |
OLD | NEW |