| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/factory.h" |
| 6 #include "src/isolate.h" |
| 7 #include "src/objects.h" |
| 8 // FIXME(mstarzinger, marja): This is weird, but required because of the missing |
| 9 // (disallowed) include: src/factory.h -> src/objects-inl.h |
| 10 #include "src/objects-inl.h" |
| 11 // FIXME(mstarzinger, marja): This is weird, but required because of the missing |
| 12 // (disallowed) include: src/type-feedback-vector.h -> |
| 13 // src/type-feedback-vector-inl.h |
| 14 #include "src/type-feedback-vector-inl.h" |
| 5 #include "test/cctest/compiler/function-tester.h" | 15 #include "test/cctest/compiler/function-tester.h" |
| 6 | 16 |
| 7 namespace v8 { | 17 namespace v8 { |
| 8 namespace internal { | 18 namespace internal { |
| 9 namespace compiler { | 19 namespace compiler { |
| 10 | 20 |
| 11 TEST(ArgumentsMapped) { | 21 TEST(ArgumentsMapped) { |
| 12 FunctionTester T("(function(a) { return arguments; })"); | 22 FunctionTester T("(function(a) { return arguments; })"); |
| 13 | 23 |
| 14 Handle<Object> arguments; | 24 Handle<Object> arguments; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 42 CHECK(arguments->IsJSObject() && arguments->IsJSArray()); | 52 CHECK(arguments->IsJSObject() && arguments->IsJSArray()); |
| 43 CHECK(!JSObject::cast(*arguments)->HasSloppyArgumentsElements()); | 53 CHECK(!JSObject::cast(*arguments)->HasSloppyArgumentsElements()); |
| 44 Handle<String> l = T.isolate->factory()->length_string(); | 54 Handle<String> l = T.isolate->factory()->length_string(); |
| 45 Handle<Object> length = Object::GetProperty(arguments, l).ToHandleChecked(); | 55 Handle<Object> length = Object::GetProperty(arguments, l).ToHandleChecked(); |
| 46 CHECK_EQ(3, length->Number()); | 56 CHECK_EQ(3, length->Number()); |
| 47 } | 57 } |
| 48 | 58 |
| 49 } // namespace compiler | 59 } // namespace compiler |
| 50 } // namespace internal | 60 } // namespace internal |
| 51 } // namespace v8 | 61 } // namespace v8 |
| OLD | NEW |