| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 v8::HandleScope scope(env->GetIsolate()); | 1029 v8::HandleScope scope(env->GetIsolate()); |
| 1030 | 1030 |
| 1031 CheckDebugBreakFunction(&env, | 1031 CheckDebugBreakFunction(&env, |
| 1032 "function f1(){}", "f1", | 1032 "function f1(){}", "f1", |
| 1033 0, | 1033 0, |
| 1034 v8::internal::RelocInfo::JS_RETURN, | 1034 v8::internal::RelocInfo::JS_RETURN, |
| 1035 NULL); | 1035 NULL); |
| 1036 CheckDebugBreakFunction(&env, | 1036 CheckDebugBreakFunction(&env, |
| 1037 "function f2(){x=1;}", "f2", | 1037 "function f2(){x=1;}", "f2", |
| 1038 0, | 1038 0, |
| 1039 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1039 v8::internal::RelocInfo::CODE_TARGET, |
| 1040 CcTest::i_isolate()->builtins()->builtin( | 1040 CcTest::i_isolate()->builtins()->builtin( |
| 1041 Builtins::kStoreIC_DebugBreak)); | 1041 Builtins::kStoreIC_DebugBreak)); |
| 1042 CheckDebugBreakFunction(&env, | 1042 CheckDebugBreakFunction(&env, |
| 1043 "function f3(){var a=x;}", "f3", | 1043 "function f3(){var a=x;}", "f3", |
| 1044 0, | 1044 0, |
| 1045 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1045 v8::internal::RelocInfo::CODE_TARGET, |
| 1046 CcTest::i_isolate()->builtins()->builtin( | 1046 CcTest::i_isolate()->builtins()->builtin( |
| 1047 Builtins::kLoadIC_DebugBreak)); | 1047 Builtins::kLoadIC_DebugBreak)); |
| 1048 | 1048 |
| 1049 // TODO(1240753): Make the test architecture independent or split | 1049 // TODO(1240753): Make the test architecture independent or split |
| 1050 // parts of the debugger into architecture dependent files. This | 1050 // parts of the debugger into architecture dependent files. This |
| 1051 // part currently disabled as it is not portable between IA32/ARM. | 1051 // part currently disabled as it is not portable between IA32/ARM. |
| 1052 // Currently on ICs for keyed store/load on ARM. | 1052 // Currently on ICs for keyed store/load on ARM. |
| 1053 #if !defined (__arm__) && !defined(__thumb__) | 1053 #if !defined (__arm__) && !defined(__thumb__) |
| 1054 CheckDebugBreakFunction( | 1054 CheckDebugBreakFunction( |
| 1055 &env, | 1055 &env, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1080 | 1080 |
| 1081 // Check the debug break code stubs for call ICs with different number of | 1081 // Check the debug break code stubs for call ICs with different number of |
| 1082 // parameters. | 1082 // parameters. |
| 1083 Handle<Code> debug_break_0 = v8::internal::ComputeCallDebugBreak(0); | 1083 Handle<Code> debug_break_0 = v8::internal::ComputeCallDebugBreak(0); |
| 1084 Handle<Code> debug_break_1 = v8::internal::ComputeCallDebugBreak(1); | 1084 Handle<Code> debug_break_1 = v8::internal::ComputeCallDebugBreak(1); |
| 1085 Handle<Code> debug_break_4 = v8::internal::ComputeCallDebugBreak(4); | 1085 Handle<Code> debug_break_4 = v8::internal::ComputeCallDebugBreak(4); |
| 1086 | 1086 |
| 1087 CheckDebugBreakFunction(&env, | 1087 CheckDebugBreakFunction(&env, |
| 1088 "function f4_0(){x();}", "f4_0", | 1088 "function f4_0(){x();}", "f4_0", |
| 1089 0, | 1089 0, |
| 1090 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1090 v8::internal::RelocInfo::CODE_TARGET, |
| 1091 *debug_break_0); | 1091 *debug_break_0); |
| 1092 | 1092 |
| 1093 CheckDebugBreakFunction(&env, | 1093 CheckDebugBreakFunction(&env, |
| 1094 "function f4_1(){x(1);}", "f4_1", | 1094 "function f4_1(){x(1);}", "f4_1", |
| 1095 0, | 1095 0, |
| 1096 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1096 v8::internal::RelocInfo::CODE_TARGET, |
| 1097 *debug_break_1); | 1097 *debug_break_1); |
| 1098 | 1098 |
| 1099 CheckDebugBreakFunction(&env, | 1099 CheckDebugBreakFunction(&env, |
| 1100 "function f4_4(){x(1,2,3,4);}", "f4_4", | 1100 "function f4_4(){x(1,2,3,4);}", "f4_4", |
| 1101 0, | 1101 0, |
| 1102 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1102 v8::internal::RelocInfo::CODE_TARGET, |
| 1103 *debug_break_4); | 1103 *debug_break_4); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 | 1106 |
| 1107 // Test that the debug info in the VM is in sync with the functions being | 1107 // Test that the debug info in the VM is in sync with the functions being |
| 1108 // debugged. | 1108 // debugged. |
| 1109 TEST(DebugInfo) { | 1109 TEST(DebugInfo) { |
| 1110 DebugLocalContext env; | 1110 DebugLocalContext env; |
| 1111 v8::HandleScope scope(env->GetIsolate()); | 1111 v8::HandleScope scope(env->GetIsolate()); |
| 1112 // Create a couple of functions for the test. | 1112 // Create a couple of functions for the test. |
| (...skipping 6555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7668 TEST(LiveEditDisabled) { | 7668 TEST(LiveEditDisabled) { |
| 7669 v8::internal::FLAG_allow_natives_syntax = true; | 7669 v8::internal::FLAG_allow_natives_syntax = true; |
| 7670 LocalContext env; | 7670 LocalContext env; |
| 7671 v8::HandleScope scope(env->GetIsolate()); | 7671 v8::HandleScope scope(env->GetIsolate()); |
| 7672 v8::Debug::SetLiveEditEnabled(false, env->GetIsolate()); | 7672 v8::Debug::SetLiveEditEnabled(false, env->GetIsolate()); |
| 7673 CompileRun("%LiveEditCompareStrings('', '')"); | 7673 CompileRun("%LiveEditCompareStrings('', '')"); |
| 7674 } | 7674 } |
| 7675 | 7675 |
| 7676 | 7676 |
| 7677 #endif // ENABLE_DEBUGGER_SUPPORT | 7677 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |