| 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/api.h" | 5 #include "src/api.h" |
| 6 #include "src/contexts.h" | 6 #include "src/contexts.h" |
| 7 #include "src/flags.h" | 7 #include "src/flags.h" |
| 8 #include "src/objects-inl.h" |
| 8 #include "src/objects.h" | 9 #include "src/objects.h" |
| 9 #include "test/cctest/compiler/function-tester.h" | 10 #include "test/cctest/compiler/function-tester.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 namespace compiler { | 14 namespace compiler { |
| 14 | 15 |
| 15 TEST(SimpleCall) { | 16 TEST(SimpleCall) { |
| 16 FunctionTester T("(function(foo,a) { return foo(a); })"); | 17 FunctionTester T("(function(foo,a) { return foo(a); })"); |
| 17 Handle<JSFunction> foo = T.NewFunction("(function(a) { return a; })"); | 18 Handle<JSFunction> foo = T.NewFunction("(function(a) { return a; })"); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 "function bar() { return eval('x') };" | 202 "function bar() { return eval('x') };" |
| 202 "return bar;" | 203 "return bar;" |
| 203 "})();"); | 204 "})();"); |
| 204 | 205 |
| 205 T.CheckCall(T.Val(42), T.Val("x"), T.undefined()); | 206 T.CheckCall(T.Val(42), T.Val("x"), T.undefined()); |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace compiler | 209 } // namespace compiler |
| 209 } // namespace internal | 210 } // namespace internal |
| 210 } // namespace v8 | 211 } // namespace v8 |
| OLD | NEW |