OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 10157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10168 | 10168 |
10169 CHECK(stackTrace->AsArray()->IsArray()); | 10169 CHECK(stackTrace->AsArray()->IsArray()); |
10170 } else if (testGroup == kDetailedTest) { | 10170 } else if (testGroup == kDetailedTest) { |
10171 v8::Handle<v8::StackTrace> stackTrace = | 10171 v8::Handle<v8::StackTrace> stackTrace = |
10172 v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed); | 10172 v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed); |
10173 CHECK_EQ(4, stackTrace->GetFrameCount()); | 10173 CHECK_EQ(4, stackTrace->GetFrameCount()); |
10174 checkStackFrame(origin, "bat", 4, 22, false, false, | 10174 checkStackFrame(origin, "bat", 4, 22, false, false, |
10175 stackTrace->GetFrame(0)); | 10175 stackTrace->GetFrame(0)); |
10176 checkStackFrame(origin, "baz", 8, 3, false, true, | 10176 checkStackFrame(origin, "baz", 8, 3, false, true, |
10177 stackTrace->GetFrame(1)); | 10177 stackTrace->GetFrame(1)); |
10178 checkStackFrame(NULL, "", 1, 1, true, false, | 10178 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 10179 bool is_eval = true; |
| 10180 #else // ENABLE_DEBUGGER_SUPPORT |
| 10181 bool is_eval = false; |
| 10182 #endif // ENABLE_DEBUGGER_SUPPORT |
| 10183 |
| 10184 checkStackFrame(NULL, "", 1, 1, is_eval, false, |
10179 stackTrace->GetFrame(2)); | 10185 stackTrace->GetFrame(2)); |
10180 // The last frame is an anonymous function that has the initial call to foo. | 10186 // The last frame is an anonymous function that has the initial call to foo. |
10181 checkStackFrame(origin, "", 10, 1, false, false, | 10187 checkStackFrame(origin, "", 10, 1, false, false, |
10182 stackTrace->GetFrame(3)); | 10188 stackTrace->GetFrame(3)); |
10183 | 10189 |
10184 CHECK(stackTrace->AsArray()->IsArray()); | 10190 CHECK(stackTrace->AsArray()->IsArray()); |
10185 } | 10191 } |
10186 return v8::Undefined(); | 10192 return v8::Undefined(); |
10187 } | 10193 } |
10188 | 10194 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10916 const char* code = | 10922 const char* code = |
10917 "(function() {" | 10923 "(function() {" |
10918 " for (var i = 0; i < 2*16; i++) {" | 10924 " for (var i = 0; i < 2*16; i++) {" |
10919 " %_GetFromCache(0, 'a' + i);" | 10925 " %_GetFromCache(0, 'a' + i);" |
10920 " };" | 10926 " };" |
10921 " return 'PASSED';" | 10927 " return 'PASSED';" |
10922 "})()"; | 10928 "})()"; |
10923 v8::internal::Heap::ClearJSFunctionResultCaches(); | 10929 v8::internal::Heap::ClearJSFunctionResultCaches(); |
10924 ExpectString(code, "PASSED"); | 10930 ExpectString(code, "PASSED"); |
10925 } | 10931 } |
OLD | NEW |