Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: test/cctest/test-serialize.cc

Issue 389573006: Change ScriptCompiler::CompileOptions and add d8 --cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: even more rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 135a915585ab58154355f9dc6b5dc9331437102c..115b4e4f0365bfd4ef1dfc6dd81254072208feea 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -697,21 +697,22 @@ TEST(SerializeToplevelOnePlusOne) {
ScriptData* cache = NULL;
- Handle<SharedFunctionInfo> orig =
- Compiler::CompileScript(orig_source, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()), NULL,
- &cache, PRODUCE_CACHED_DATA, NOT_NATIVES_CODE);
+ Handle<SharedFunctionInfo> orig = Compiler::CompileScript(
+ orig_source, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE);
int builtins_count = CountBuiltins();
Handle<SharedFunctionInfo> copy;
{
DisallowCompilation no_compile_expected(isolate);
- copy = Compiler::CompileScript(copy_source, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()),
- NULL, &cache, CONSUME_CACHED_DATA,
- NOT_NATIVES_CODE);
+ copy = Compiler::CompileScript(
+ copy_source, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kConsumeCodeCache, NOT_NATIVES_CODE);
}
+
CHECK_NE(*orig, *copy);
CHECK(Script::cast(copy->script())->source() == *copy_source);
@@ -751,10 +752,10 @@ TEST(SerializeToplevelInternalizedString) {
Handle<JSObject> global(isolate->context()->global_object());
ScriptData* cache = NULL;
- Handle<SharedFunctionInfo> orig =
- Compiler::CompileScript(orig_source, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()), NULL,
- &cache, PRODUCE_CACHED_DATA, NOT_NATIVES_CODE);
+ Handle<SharedFunctionInfo> orig = Compiler::CompileScript(
+ orig_source, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE);
Handle<JSFunction> orig_fun =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
orig, isolate->native_context());
@@ -767,10 +768,10 @@ TEST(SerializeToplevelInternalizedString) {
Handle<SharedFunctionInfo> copy;
{
DisallowCompilation no_compile_expected(isolate);
- copy = Compiler::CompileScript(copy_source, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()),
- NULL, &cache, CONSUME_CACHED_DATA,
- NOT_NATIVES_CODE);
+ copy = Compiler::CompileScript(
+ copy_source, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kConsumeCodeCache, NOT_NATIVES_CODE);
}
CHECK_NE(*orig, *copy);
CHECK(Script::cast(copy->script())->source() == *copy_source);
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698