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

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 2076953002: [turbofan] CodeAssembler is now able to generate calls of JavaScript objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-test-code-assember
Patch Set: Created 4 years, 6 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 | « src/compiler/code-assembler.cc ('k') | test/cctest/compiler/test-code-assembler.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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 FunctionTester(const CallInterfaceDescriptor& descriptor, Handle<Code> code) 54 FunctionTester(const CallInterfaceDescriptor& descriptor, Handle<Code> code)
55 : FunctionTester(code, descriptor.GetParameterCount()) {} 55 : FunctionTester(code, descriptor.GetParameterCount()) {}
56 56
57 Isolate* isolate; 57 Isolate* isolate;
58 Handle<JSFunction> function; 58 Handle<JSFunction> function;
59 59
60 MaybeHandle<Object> Call() { 60 MaybeHandle<Object> Call() {
61 return Execution::Call(isolate, function, undefined(), 0, nullptr); 61 return Execution::Call(isolate, function, undefined(), 0, nullptr);
62 } 62 }
63 63
64 MaybeHandle<Object> Call(Handle<Object> a) {
65 Handle<Object> args[] = {a};
66 return Execution::Call(isolate, function, undefined(), 1, args);
67 }
68
64 MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b) { 69 MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b) {
65 Handle<Object> args[] = {a, b}; 70 Handle<Object> args[] = {a, b};
66 return Execution::Call(isolate, function, undefined(), 2, args); 71 return Execution::Call(isolate, function, undefined(), 2, args);
67 } 72 }
68 73
69 MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b, 74 MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b,
70 Handle<Object> c) { 75 Handle<Object> c) {
71 Handle<Object> args[] = {a, b, c}; 76 Handle<Object> args[] = {a, b, c};
72 return Execution::Call(isolate, function, undefined(), 3, args); 77 return Execution::Call(isolate, function, undefined(), 3, args);
73 } 78 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 CHECK(!code.is_null()); 259 CHECK(!code.is_null());
255 function->ReplaceCode(*code); 260 function->ReplaceCode(*code);
256 return function; 261 return function;
257 } 262 }
258 }; 263 };
259 } // namespace compiler 264 } // namespace compiler
260 } // namespace internal 265 } // namespace internal
261 } // namespace v8 266 } // namespace v8
262 267
263 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 268 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.cc ('k') | test/cctest/compiler/test-code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698