OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 " a=1;b=2;x=a;y[index]=3;x=y[index];bar();}", "foo"); | 2294 " a=1;b=2;x=a;y[index]=3;x=y[index];bar();}", "foo"); |
2295 SetBreakPoint(foo, 0); | 2295 SetBreakPoint(foo, 0); |
2296 | 2296 |
2297 // Register a debug event listener which steps and counts. | 2297 // Register a debug event listener which steps and counts. |
2298 v8::Debug::SetDebugEventListener(DebugEventStep); | 2298 v8::Debug::SetDebugEventListener(DebugEventStep); |
2299 | 2299 |
2300 step_action = StepIn; | 2300 step_action = StepIn; |
2301 break_point_hit_count = 0; | 2301 break_point_hit_count = 0; |
2302 foo->Call(env->Global(), 0, NULL); | 2302 foo->Call(env->Global(), 0, NULL); |
2303 | 2303 |
2304 // With stepping all break locations are hit. For ARM the keyed load/store | 2304 // With stepping all break locations are hit. |
2305 // is not hit as they are not implemented as ICs. | |
2306 #if defined (__arm__) || defined(__thumb__) | |
2307 CHECK_EQ(6, break_point_hit_count); | |
2308 #else | |
2309 CHECK_EQ(8, break_point_hit_count); | 2305 CHECK_EQ(8, break_point_hit_count); |
2310 #endif | |
2311 | 2306 |
2312 v8::Debug::SetDebugEventListener(NULL); | 2307 v8::Debug::SetDebugEventListener(NULL); |
2313 CheckDebuggerUnloaded(); | 2308 CheckDebuggerUnloaded(); |
2314 | 2309 |
2315 // Register a debug event listener which just counts. | 2310 // Register a debug event listener which just counts. |
2316 v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount); | 2311 v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount); |
2317 | 2312 |
2318 SetBreakPoint(foo, 0); | 2313 SetBreakPoint(foo, 0); |
2319 break_point_hit_count = 0; | 2314 break_point_hit_count = 0; |
2320 foo->Call(env->Global(), 0, NULL); | 2315 foo->Call(env->Global(), 0, NULL); |
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5365 v8::Script::New( | 5360 v8::Script::New( |
5366 v8::String::New( | 5361 v8::String::New( |
5367 "function runTest(mirror) {" | 5362 "function runTest(mirror) {" |
5368 " return mirror.isString() && (mirror.length() == 5);" | 5363 " return mirror.isString() && (mirror.length() == 5);" |
5369 "}" | 5364 "}" |
5370 "" | 5365 "" |
5371 "runTest;"))->Run()); | 5366 "runTest;"))->Run()); |
5372 v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj); | 5367 v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj); |
5373 CHECK(result->IsTrue()); | 5368 CHECK(result->IsTrue()); |
5374 } | 5369 } |
OLD | NEW |