| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 | 980 |
| 981 CompileScript(isolate, src, src, &cache, | 981 CompileScript(isolate, src, src, &cache, |
| 982 v8::ScriptCompiler::kProduceCodeCache); | 982 v8::ScriptCompiler::kProduceCodeCache); |
| 983 | 983 |
| 984 DisallowCompilation no_compile_expected(isolate); | 984 DisallowCompilation no_compile_expected(isolate); |
| 985 Handle<SharedFunctionInfo> copy = CompileScript( | 985 Handle<SharedFunctionInfo> copy = CompileScript( |
| 986 isolate, src, src, &cache, v8::ScriptCompiler::kConsumeCodeCache); | 986 isolate, src, src, &cache, v8::ScriptCompiler::kConsumeCodeCache); |
| 987 | 987 |
| 988 CHECK(isolate->compilation_cache() | 988 CHECK(isolate->compilation_cache() |
| 989 ->LookupScript(src, src, 0, 0, v8::ScriptOriginOptions(), | 989 ->LookupScript(src, src, 0, 0, v8::ScriptOriginOptions(), |
| 990 isolate->native_context(), SLOPPY) | 990 isolate->native_context(), SLOPPY, false) |
| 991 .ToHandleChecked() | 991 .ToHandleChecked() |
| 992 .is_identical_to(copy)); | 992 .is_identical_to(copy)); |
| 993 | 993 |
| 994 delete cache; | 994 delete cache; |
| 995 } | 995 } |
| 996 | 996 |
| 997 TEST(CodeSerializerInternalizedString) { | 997 TEST(CodeSerializerInternalizedString) { |
| 998 FLAG_serialize_toplevel = true; | 998 FLAG_serialize_toplevel = true; |
| 999 LocalContext context; | 999 LocalContext context; |
| 1000 Isolate* isolate = CcTest::i_isolate(); | 1000 Isolate* isolate = CcTest::i_isolate(); |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 } | 2116 } |
| 2117 delete[] blob.data; | 2117 delete[] blob.data; |
| 2118 } | 2118 } |
| 2119 | 2119 |
| 2120 TEST(SerializationMemoryStats) { | 2120 TEST(SerializationMemoryStats) { |
| 2121 FLAG_profile_deserialization = true; | 2121 FLAG_profile_deserialization = true; |
| 2122 FLAG_always_opt = false; | 2122 FLAG_always_opt = false; |
| 2123 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); | 2123 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); |
| 2124 delete[] blob.data; | 2124 delete[] blob.data; |
| 2125 } | 2125 } |
| OLD | NEW |