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

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

Issue 389573006: Change ScriptCompiler::CompileOptions and add d8 --cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 8e629b44a7136ea38ee44468fc40c2beb5b73c56..c95f68ba584951ff405643e003b1c7223ba9998d 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -59,15 +59,10 @@ static Handle<JSFunction> Compile(const char* source) {
Isolate* isolate = CcTest::i_isolate();
Handle<String> source_code = isolate->factory()->NewStringFromUtf8(
CStrVector(source)).ToHandleChecked();
- Handle<SharedFunctionInfo> shared_function =
- Compiler::CompileScript(source_code,
- Handle<String>(),
- 0,
- 0,
- false,
- Handle<Context>(isolate->native_context()),
- NULL, NULL, NO_CACHED_DATA,
- NOT_NATIVES_CODE);
+ Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript(
+ source_code, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, NULL,
+ v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE);
return isolate->factory()->NewFunctionFromSharedFunctionInfo(
shared_function, isolate->native_context());
}
@@ -418,15 +413,15 @@ TEST(SerializeToplevel) {
ScriptData* cache = NULL;
- Handle<SharedFunctionInfo> orig =
- Compiler::CompileScript(source1_string, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()), NULL,
- &cache, PRODUCE_CACHED_DATA, NOT_NATIVES_CODE);
+ Handle<SharedFunctionInfo> orig = Compiler::CompileScript(
+ source1_string, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE);
- Handle<SharedFunctionInfo> info =
- Compiler::CompileScript(source2_string, Handle<String>(), 0, 0, false,
- Handle<Context>(isolate->native_context()), NULL,
- &cache, CONSUME_CACHED_DATA, NOT_NATIVES_CODE);
+ Handle<SharedFunctionInfo> info = Compiler::CompileScript(
+ source2_string, Handle<String>(), 0, 0, false,
+ Handle<Context>(isolate->native_context()), NULL, &cache,
+ v8::ScriptCompiler::kConsumeCodeCache, NOT_NATIVES_CODE);
CHECK_NE(*orig, *info);
Handle<JSFunction> fun =
« src/api.cc ('K') | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698