| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, | 25 static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, |
| 26 "dummy", 0, 0, 0, 0, 0, 0); | 26 "dummy", 0, 0, 0, 0, 0, 0); |
| 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, | 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); |
| 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"); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |