| 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 }; | 1050 }; |
| 1051 Handle<Object> result = Execution::TryCall(check_break_point, | 1051 Handle<Object> result = Execution::TryCall(check_break_point, |
| 1052 Isolate::Current()->js_builtins_object(), argc, argv, &caught_exception); | 1052 Isolate::Current()->js_builtins_object(), argc, argv, &caught_exception); |
| 1053 | 1053 |
| 1054 // If exception or non boolean result handle as not triggered | 1054 // If exception or non boolean result handle as not triggered |
| 1055 if (caught_exception || !result->IsBoolean()) { | 1055 if (caught_exception || !result->IsBoolean()) { |
| 1056 return false; | 1056 return false; |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 // Return whether the break point is triggered. | 1059 // Return whether the break point is triggered. |
| 1060 return *result == HEAP->true_value(); | 1060 ASSERT(!result.is_null()); |
| 1061 return (*result)->IsTrue(); |
| 1061 } | 1062 } |
| 1062 | 1063 |
| 1063 | 1064 |
| 1064 // Check whether the function has debug information. | 1065 // Check whether the function has debug information. |
| 1065 bool Debug::HasDebugInfo(Handle<SharedFunctionInfo> shared) { | 1066 bool Debug::HasDebugInfo(Handle<SharedFunctionInfo> shared) { |
| 1066 return !shared->debug_info()->IsUndefined(); | 1067 return !shared->debug_info()->IsUndefined(); |
| 1067 } | 1068 } |
| 1068 | 1069 |
| 1069 | 1070 |
| 1070 // Return the debug info for this function. EnsureDebugInfo must be called | 1071 // Return the debug info for this function. EnsureDebugInfo must be called |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 thread_local_.last_fp_ = frame->fp(); | 1327 thread_local_.last_fp_ = frame->fp(); |
| 1327 } else { | 1328 } else { |
| 1328 // If it's CallFunction stub ensure target function is compiled and flood | 1329 // If it's CallFunction stub ensure target function is compiled and flood |
| 1329 // it with one shot breakpoints. | 1330 // it with one shot breakpoints. |
| 1330 if (!call_function_stub.is_null()) { | 1331 if (!call_function_stub.is_null()) { |
| 1331 // Find out number of arguments from the stub minor key. | 1332 // Find out number of arguments from the stub minor key. |
| 1332 // Reverse lookup required as the minor key cannot be retrieved | 1333 // Reverse lookup required as the minor key cannot be retrieved |
| 1333 // from the code object. | 1334 // from the code object. |
| 1334 Handle<Object> obj( | 1335 Handle<Object> obj( |
| 1335 HEAP->code_stubs()->SlowReverseLookup(*call_function_stub)); | 1336 HEAP->code_stubs()->SlowReverseLookup(*call_function_stub)); |
| 1336 ASSERT(*obj != HEAP->undefined_value()); | 1337 ASSERT(!obj.is_null()); |
| 1338 ASSERT(!(*obj)->IsUndefined()); |
| 1337 ASSERT(obj->IsSmi()); | 1339 ASSERT(obj->IsSmi()); |
| 1338 // Get the STUB key and extract major and minor key. | 1340 // Get the STUB key and extract major and minor key. |
| 1339 uint32_t key = Smi::cast(*obj)->value(); | 1341 uint32_t key = Smi::cast(*obj)->value(); |
| 1340 // Argc in the stub is the number of arguments passed - not the | 1342 // Argc in the stub is the number of arguments passed - not the |
| 1341 // expected arguments of the called function. | 1343 // expected arguments of the called function. |
| 1342 int call_function_arg_count = | 1344 int call_function_arg_count = |
| 1343 CallFunctionStub::ExtractArgcFromMinorKey( | 1345 CallFunctionStub::ExtractArgcFromMinorKey( |
| 1344 CodeStub::MinorKeyFromKey(key)); | 1346 CodeStub::MinorKeyFromKey(key)); |
| 1345 ASSERT(call_function_stub->major_key() == | 1347 ASSERT(call_function_stub->major_key() == |
| 1346 CodeStub::MajorKeyFromKey(key)); | 1348 CodeStub::MajorKeyFromKey(key)); |
| (...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 { | 3084 { |
| 3083 Locker locker; | 3085 Locker locker; |
| 3084 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3086 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3085 } | 3087 } |
| 3086 } | 3088 } |
| 3087 } | 3089 } |
| 3088 | 3090 |
| 3089 #endif // ENABLE_DEBUGGER_SUPPORT | 3091 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3090 | 3092 |
| 3091 } } // namespace v8::internal | 3093 } } // namespace v8::internal |
| OLD | NEW |