Chromium Code Reviews| 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 6645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6656 CHECK_EQ(4, function_data.End().GetColumnNumber()); | 6656 CHECK_EQ(4, function_data.End().GetColumnNumber()); |
| 6657 CHECK_EQ(1, function_data.Count()); | 6657 CHECK_EQ(1, function_data.Count()); |
| 6658 | 6658 |
| 6659 function_data = script_data.GetFunctionData(1); | 6659 function_data = script_data.GetFunctionData(1); |
| 6660 CHECK_EQ(0, function_data.Start().GetLineNumber()); | 6660 CHECK_EQ(0, function_data.Start().GetLineNumber()); |
| 6661 CHECK_EQ(0, function_data.Start().GetColumnNumber()); | 6661 CHECK_EQ(0, function_data.Start().GetColumnNumber()); |
| 6662 CHECK_EQ(1, function_data.End().GetLineNumber()); | 6662 CHECK_EQ(1, function_data.End().GetLineNumber()); |
| 6663 CHECK_EQ(1, function_data.End().GetColumnNumber()); | 6663 CHECK_EQ(1, function_data.End().GetColumnNumber()); |
| 6664 CHECK_EQ(2, function_data.Count()); | 6664 CHECK_EQ(2, function_data.Count()); |
| 6665 } | 6665 } |
| 6666 | |
| 6667 TEST(BuiltinsExceptionPrediction) { | |
| 6668 i::Builtins* builtins = CcTest::i_isolate()->builtins(); | |
| 6669 bool fail = false; | |
| 6670 for (int i = 0; i < i::Builtins::builtin_count; i++) { | |
| 6671 Code* builtin = builtins->builtin(static_cast<i::Builtins::Name>(i)); | |
| 6672 if (i::HandlerTable::cast(builtin->handler_table())->length() > 0 && | |
| 6673 !builtin->is_promise_rejection() && !builtin->is_exception_caught()) { | |
| 6674 fail = true; | |
| 6675 i::PrintF("%s is missing exception predictions.\n", builtins->name(i)); | |
|
Yang
2017/03/06 11:45:02
The output of this is currently:
ResolvePromise i
| |
| 6676 } | |
| 6677 } | |
| 6678 CHECK(!fail); | |
| 6679 } | |
| OLD | NEW |