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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 v8::HandleScope scope(env->GetIsolate()); | 1088 v8::HandleScope scope(env->GetIsolate()); |
1089 | 1089 |
1090 CheckDebugBreakFunction(&env, | 1090 CheckDebugBreakFunction(&env, |
1091 "function f1(){}", "f1", | 1091 "function f1(){}", "f1", |
1092 0, | 1092 0, |
1093 v8::internal::RelocInfo::JS_RETURN, | 1093 v8::internal::RelocInfo::JS_RETURN, |
1094 NULL); | 1094 NULL); |
1095 CheckDebugBreakFunction(&env, | 1095 CheckDebugBreakFunction(&env, |
1096 "function f2(){x=1;}", "f2", | 1096 "function f2(){x=1;}", "f2", |
1097 0, | 1097 0, |
1098 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1098 v8::internal::RelocInfo::CODE_TARGET, |
1099 CcTest::i_isolate()->builtins()->builtin( | 1099 CcTest::i_isolate()->builtins()->builtin( |
1100 Builtins::kStoreIC_DebugBreak)); | 1100 Builtins::kStoreIC_DebugBreak)); |
1101 CheckDebugBreakFunction(&env, | 1101 CheckDebugBreakFunction(&env, |
1102 "function f3(){var a=x;}", "f3", | 1102 "function f3(){var a=x;}", "f3", |
1103 0, | 1103 0, |
1104 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1104 v8::internal::RelocInfo::CODE_TARGET, |
1105 CcTest::i_isolate()->builtins()->builtin( | 1105 CcTest::i_isolate()->builtins()->builtin( |
1106 Builtins::kLoadIC_DebugBreak)); | 1106 Builtins::kLoadIC_DebugBreak)); |
1107 | 1107 |
1108 // TODO(1240753): Make the test architecture independent or split | 1108 // TODO(1240753): Make the test architecture independent or split |
1109 // parts of the debugger into architecture dependent files. This | 1109 // parts of the debugger into architecture dependent files. This |
1110 // part currently disabled as it is not portable between IA32/ARM. | 1110 // part currently disabled as it is not portable between IA32/ARM. |
1111 // Currently on ICs for keyed store/load on ARM. | 1111 // Currently on ICs for keyed store/load on ARM. |
1112 #if !defined (__arm__) && !defined(__thumb__) | 1112 #if !defined (__arm__) && !defined(__thumb__) |
1113 CheckDebugBreakFunction( | 1113 CheckDebugBreakFunction( |
1114 &env, | 1114 &env, |
(...skipping 24 matching lines...) Expand all Loading... |
1139 | 1139 |
1140 // Check the debug break code stubs for call ICs with different number of | 1140 // Check the debug break code stubs for call ICs with different number of |
1141 // parameters. | 1141 // parameters. |
1142 Handle<Code> debug_break_0 = v8::internal::ComputeCallDebugBreak(0); | 1142 Handle<Code> debug_break_0 = v8::internal::ComputeCallDebugBreak(0); |
1143 Handle<Code> debug_break_1 = v8::internal::ComputeCallDebugBreak(1); | 1143 Handle<Code> debug_break_1 = v8::internal::ComputeCallDebugBreak(1); |
1144 Handle<Code> debug_break_4 = v8::internal::ComputeCallDebugBreak(4); | 1144 Handle<Code> debug_break_4 = v8::internal::ComputeCallDebugBreak(4); |
1145 | 1145 |
1146 CheckDebugBreakFunction(&env, | 1146 CheckDebugBreakFunction(&env, |
1147 "function f4_0(){x();}", "f4_0", | 1147 "function f4_0(){x();}", "f4_0", |
1148 0, | 1148 0, |
1149 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1149 v8::internal::RelocInfo::CODE_TARGET, |
1150 *debug_break_0); | 1150 *debug_break_0); |
1151 | 1151 |
1152 CheckDebugBreakFunction(&env, | 1152 CheckDebugBreakFunction(&env, |
1153 "function f4_1(){x(1);}", "f4_1", | 1153 "function f4_1(){x(1);}", "f4_1", |
1154 0, | 1154 0, |
1155 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1155 v8::internal::RelocInfo::CODE_TARGET, |
1156 *debug_break_1); | 1156 *debug_break_1); |
1157 | 1157 |
1158 CheckDebugBreakFunction(&env, | 1158 CheckDebugBreakFunction(&env, |
1159 "function f4_4(){x(1,2,3,4);}", "f4_4", | 1159 "function f4_4(){x(1,2,3,4);}", "f4_4", |
1160 0, | 1160 0, |
1161 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, | 1161 v8::internal::RelocInfo::CODE_TARGET, |
1162 *debug_break_4); | 1162 *debug_break_4); |
1163 } | 1163 } |
1164 | 1164 |
1165 | 1165 |
1166 // Test that the debug info in the VM is in sync with the functions being | 1166 // Test that the debug info in the VM is in sync with the functions being |
1167 // debugged. | 1167 // debugged. |
1168 TEST(DebugInfo) { | 1168 TEST(DebugInfo) { |
1169 DebugLocalContext env; | 1169 DebugLocalContext env; |
1170 v8::HandleScope scope(env->GetIsolate()); | 1170 v8::HandleScope scope(env->GetIsolate()); |
1171 // Create a couple of functions for the test. | 1171 // Create a couple of functions for the test. |
(...skipping 6555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7727 TEST(LiveEditDisabled) { | 7727 TEST(LiveEditDisabled) { |
7728 v8::internal::FLAG_allow_natives_syntax = true; | 7728 v8::internal::FLAG_allow_natives_syntax = true; |
7729 LocalContext env; | 7729 LocalContext env; |
7730 v8::HandleScope scope(env->GetIsolate()); | 7730 v8::HandleScope scope(env->GetIsolate()); |
7731 v8::Debug::SetLiveEditEnabled(false), env->GetIsolate(); | 7731 v8::Debug::SetLiveEditEnabled(false), env->GetIsolate(); |
7732 CompileRun("%LiveEditCompareStrings('', '')"); | 7732 CompileRun("%LiveEditCompareStrings('', '')"); |
7733 } | 7733 } |
7734 | 7734 |
7735 | 7735 |
7736 #endif // ENABLE_DEBUGGER_SUPPORT | 7736 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |