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

Side by Side Diff: test/cctest/compiler/test-linkage.cc

Issue 902093002: Add basic compilation support for modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/zone.h" 8 #include "src/zone.h"
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // So we can get a real JS function. 28 // So we can get a real JS function.
29 static Handle<JSFunction> Compile(const char* source) { 29 static Handle<JSFunction> Compile(const char* source) {
30 Isolate* isolate = CcTest::i_isolate(); 30 Isolate* isolate = CcTest::i_isolate();
31 Handle<String> source_code = isolate->factory() 31 Handle<String> source_code = isolate->factory()
32 ->NewStringFromUtf8(CStrVector(source)) 32 ->NewStringFromUtf8(CStrVector(source))
33 .ToHandleChecked(); 33 .ToHandleChecked();
34 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript( 34 Handle<SharedFunctionInfo> shared_function = Compiler::CompileScript(
35 source_code, Handle<String>(), 0, 0, false, false, 35 source_code, Handle<String>(), 0, 0, false, false,
36 Handle<Context>(isolate->native_context()), NULL, NULL, 36 Handle<Context>(isolate->native_context()), NULL, NULL,
37 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE); 37 v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE, false);
38 return isolate->factory()->NewFunctionFromSharedFunctionInfo( 38 return isolate->factory()->NewFunctionFromSharedFunctionInfo(
39 shared_function, isolate->native_context()); 39 shared_function, isolate->native_context());
40 } 40 }
41 41
42 42
43 TEST(TestLinkageCreate) { 43 TEST(TestLinkageCreate) {
44 InitializedHandleScope handles; 44 InitializedHandleScope handles;
45 Handle<JSFunction> function = Compile("a + b"); 45 Handle<JSFunction> function = Compile("a + b");
46 CompilationInfoWithZone info(function); 46 CompilationInfoWithZone info(function);
47 Linkage linkage(info.zone(), &info); 47 Linkage linkage(info.zone(), &info);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // TODO(titzer): test linkage creation for outgoing runtime calls. 104 // TODO(titzer): test linkage creation for outgoing runtime calls.
105 } 105 }
106 106
107 107
108 TEST(TestLinkageStubCall) { 108 TEST(TestLinkageStubCall) {
109 // TODO(titzer): test linkage creation for outgoing stub calls. 109 // TODO(titzer): test linkage creation for outgoing stub calls.
110 } 110 }
111 111
112 112
113 #endif // V8_TURBOFAN_TARGET 113 #endif // V8_TURBOFAN_TARGET
OLDNEW
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698