Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 using i::SmartPointer; | 49 using i::SmartPointer; |
| 50 using i::Vector; | 50 using i::Vector; |
| 51 | 51 |
| 52 | 52 |
| 53 // Helper methods | 53 // Helper methods |
| 54 static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) { | 54 static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) { |
| 55 return v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str(name))); | 55 return v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str(name))); |
| 56 } | 56 } |
| 57 | 57 |
| 58 | 58 |
| 59 static int offset(const char* src, const char* substring) { | 59 static unsigned int offset(const char* src, const char* substring) { |
|
alph
2015/03/30 12:31:21
could you please add a check that strstr is not nu
loislo
2015/03/30 13:04:22
done
| |
| 60 return static_cast<int>(strstr(src, substring) - src); | 60 return static_cast<unsigned int>(strstr(src, substring) - src); |
| 61 } | 61 } |
| 62 | 62 |
| 63 | 63 |
| 64 static const char* reason(const i::Deoptimizer::DeoptReason reason) { | 64 static const char* reason(const i::Deoptimizer::DeoptReason reason) { |
| 65 return i::Deoptimizer::GetDeoptReason(reason); | 65 return i::Deoptimizer::GetDeoptReason(reason); |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 TEST(StartStop) { | 69 TEST(StartStop) { |
| 70 i::Isolate* isolate = CcTest::i_isolate(); | 70 i::Isolate* isolate = CcTest::i_isolate(); |
| (...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2024 iprofile->Print(); | 2024 iprofile->Print(); |
| 2025 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); | 2025 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); |
| 2026 | 2026 |
| 2027 const char* branch[] = {"", "test"}; | 2027 const char* branch[] = {"", "test"}; |
| 2028 const ProfileNode* itest_node = | 2028 const ProfileNode* itest_node = |
| 2029 GetSimpleBranch(profile, branch, arraysize(branch)); | 2029 GetSimpleBranch(profile, branch, arraysize(branch)); |
| 2030 CHECK_EQ(0, itest_node->deopt_infos().size()); | 2030 CHECK_EQ(0, itest_node->deopt_infos().size()); |
| 2031 | 2031 |
| 2032 iprofiler->DeleteProfile(iprofile); | 2032 iprofiler->DeleteProfile(iprofile); |
| 2033 } | 2033 } |
| OLD | NEW |