OLD | NEW |
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 .ToLocalChecked(); | 1657 .ToLocalChecked(); |
1658 v8::Local<v8::String> result_str = | 1658 v8::Local<v8::String> result_str = |
1659 result->ToString(isolate2->GetCurrentContext()).ToLocalChecked(); | 1659 result->ToString(isolate2->GetCurrentContext()).ToLocalChecked(); |
1660 CHECK(result_str->Equals(isolate2->GetCurrentContext(), v8_str("XY")) | 1660 CHECK(result_str->Equals(isolate2->GetCurrentContext(), v8_str("XY")) |
1661 .FromJust()); | 1661 .FromJust()); |
1662 } | 1662 } |
1663 isolate2->Dispose(); | 1663 isolate2->Dispose(); |
1664 } | 1664 } |
1665 | 1665 |
1666 TEST(CodeSerializerInternalReference) { | 1666 TEST(CodeSerializerInternalReference) { |
| 1667 // TODO(yangguo): This test should really use the CodeStubAssembler to |
| 1668 // specifically generate a controlled table switch, instead of relying |
| 1669 // on TurboFan to generate a certain graph. |
1667 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 | 1670 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 |
1668 return; | 1671 return; |
1669 #endif | 1672 #endif |
1670 // In ignition there are only relative jumps, so the following code | 1673 // In ignition there are only relative jumps, so the following code |
1671 // would not have any internal references. This test is not relevant | 1674 // would not have any internal references. This test is not relevant |
1672 // for ignition. | 1675 // for ignition. |
1673 if (FLAG_ignition) { | 1676 if (FLAG_ignition) { |
1674 return; | 1677 return; |
1675 } | 1678 } |
1676 // Disable experimental natives that are loaded after deserialization. | 1679 // Disable experimental natives that are loaded after deserialization. |
1677 FLAG_function_context_specialization = false; | 1680 FLAG_function_context_specialization = false; |
| 1681 FLAG_turbo_type_feedback = false; |
1678 FLAG_always_opt = true; | 1682 FLAG_always_opt = true; |
1679 const char* flag = "--turbo-filter=foo"; | 1683 const char* flag = "--turbo-filter=foo"; |
1680 FlagList::SetFlagsFromString(flag, StrLength(flag)); | 1684 FlagList::SetFlagsFromString(flag, StrLength(flag)); |
1681 | 1685 |
1682 const char* source = | 1686 const char* source = |
1683 "var foo = (function(stdlib, foreign, heap) {" | 1687 "var foo = (function(stdlib, foreign, heap) {" |
1684 " function foo(i) {" | 1688 " function foo(i) {" |
1685 " i = i|0;" | 1689 " i = i|0;" |
1686 " var j = 0;" | 1690 " var j = 0;" |
1687 " switch (i) {" | 1691 " switch (i) {" |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 } | 2120 } |
2117 delete[] blob.data; | 2121 delete[] blob.data; |
2118 } | 2122 } |
2119 | 2123 |
2120 TEST(SerializationMemoryStats) { | 2124 TEST(SerializationMemoryStats) { |
2121 FLAG_profile_deserialization = true; | 2125 FLAG_profile_deserialization = true; |
2122 FLAG_always_opt = false; | 2126 FLAG_always_opt = false; |
2123 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); | 2127 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); |
2124 delete[] blob.data; | 2128 delete[] blob.data; |
2125 } | 2129 } |
OLD | NEW |