| 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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 isolate2->Dispose(); | 1671 isolate2->Dispose(); |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 TEST(CodeSerializerInternalReference) { | 1674 TEST(CodeSerializerInternalReference) { |
| 1675 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 | 1675 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 |
| 1676 return; | 1676 return; |
| 1677 #endif | 1677 #endif |
| 1678 // In ignition there are only relative jumps, so the following code | 1678 // In ignition there are only relative jumps, so the following code |
| 1679 // would not have any internal references. This test is not relevant | 1679 // would not have any internal references. This test is not relevant |
| 1680 // for ignition. | 1680 // for ignition. |
| 1681 if (FLAG_ignition || FLAG_turbo) { | 1681 if (FLAG_ignition) { |
| 1682 return; | 1682 return; |
| 1683 } | 1683 } |
| 1684 // Disable experimental natives that are loaded after deserialization. | 1684 // Disable experimental natives that are loaded after deserialization. |
| 1685 FLAG_function_context_specialization = false; | 1685 FLAG_function_context_specialization = false; |
| 1686 FLAG_always_opt = true; | 1686 FLAG_always_opt = true; |
| 1687 const char* flag = "--turbo-filter=foo"; | 1687 const char* flag = "--turbo-filter=foo"; |
| 1688 FlagList::SetFlagsFromString(flag, StrLength(flag)); | 1688 FlagList::SetFlagsFromString(flag, StrLength(flag)); |
| 1689 | 1689 |
| 1690 const char* source = | 1690 const char* source = |
| 1691 "var foo = (function(stdlib, foreign, heap) {" | 1691 "var foo = (function(stdlib, foreign, heap) {" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 ->Int32Value(isolate->GetCurrentContext()) | 1755 ->Int32Value(isolate->GetCurrentContext()) |
| 1756 .FromJust()); | 1756 .FromJust()); |
| 1757 CHECK_EQ(10, CompileRun("foo(6)") | 1757 CHECK_EQ(10, CompileRun("foo(6)") |
| 1758 ->Int32Value(isolate->GetCurrentContext()) | 1758 ->Int32Value(isolate->GetCurrentContext()) |
| 1759 .FromJust()); | 1759 .FromJust()); |
| 1760 } | 1760 } |
| 1761 isolate->Dispose(); | 1761 isolate->Dispose(); |
| 1762 } | 1762 } |
| 1763 | 1763 |
| 1764 TEST(CodeSerializerEagerCompilationAndPreAge) { | 1764 TEST(CodeSerializerEagerCompilationAndPreAge) { |
| 1765 if (FLAG_ignition || FLAG_turbo) return; | 1765 if (FLAG_ignition) return; |
| 1766 | 1766 |
| 1767 FLAG_lazy = true; | 1767 FLAG_lazy = true; |
| 1768 FLAG_serialize_toplevel = true; | 1768 FLAG_serialize_toplevel = true; |
| 1769 FLAG_serialize_age_code = true; | 1769 FLAG_serialize_age_code = true; |
| 1770 FLAG_serialize_eager = true; | 1770 FLAG_serialize_eager = true; |
| 1771 FLAG_min_preparse_length = 1; | 1771 FLAG_min_preparse_length = 1; |
| 1772 | 1772 |
| 1773 static const char* source = | 1773 static const char* source = |
| 1774 "function f() {" | 1774 "function f() {" |
| 1775 " function g() {" | 1775 " function g() {" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2201 } | 2201 } |
| 2202 delete[] blob.data; | 2202 delete[] blob.data; |
| 2203 } | 2203 } |
| 2204 | 2204 |
| 2205 TEST(SerializationMemoryStats) { | 2205 TEST(SerializationMemoryStats) { |
| 2206 FLAG_profile_deserialization = true; | 2206 FLAG_profile_deserialization = true; |
| 2207 FLAG_always_opt = false; | 2207 FLAG_always_opt = false; |
| 2208 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); | 2208 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); |
| 2209 delete[] blob.data; | 2209 delete[] blob.data; |
| 2210 } | 2210 } |
| OLD | NEW |