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/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); | 868 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); |
869 entry->set_aliased_context_slot(aliased_context_slot); | 869 entry->set_aliased_context_slot(aliased_context_slot); |
870 return entry; | 870 return entry; |
871 } | 871 } |
872 | 872 |
873 | 873 |
874 Handle<AccessorInfo> Factory::NewAccessorInfo() { | 874 Handle<AccessorInfo> Factory::NewAccessorInfo() { |
875 Handle<AccessorInfo> info = | 875 Handle<AccessorInfo> info = |
876 Handle<AccessorInfo>::cast(NewStruct(ACCESSOR_INFO_TYPE)); | 876 Handle<AccessorInfo>::cast(NewStruct(ACCESSOR_INFO_TYPE)); |
877 info->set_flag(0); // Must clear the flag, it was initialized as undefined. | 877 info->set_flag(0); // Must clear the flag, it was initialized as undefined. |
| 878 info->set_is_sloppy(true); |
878 return info; | 879 return info; |
879 } | 880 } |
880 | 881 |
881 | 882 |
882 Handle<Script> Factory::NewScript(Handle<String> source) { | 883 Handle<Script> Factory::NewScript(Handle<String> source) { |
883 // Create and initialize script object. | 884 // Create and initialize script object. |
884 Heap* heap = isolate()->heap(); | 885 Heap* heap = isolate()->heap(); |
885 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); | 886 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); |
886 script->set_source(*source); | 887 script->set_source(*source); |
887 script->set_name(heap->undefined_value()); | 888 script->set_name(heap->undefined_value()); |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 } | 2380 } |
2380 | 2381 |
2381 | 2382 |
2382 Handle<Object> Factory::ToBoolean(bool value) { | 2383 Handle<Object> Factory::ToBoolean(bool value) { |
2383 return value ? true_value() : false_value(); | 2384 return value ? true_value() : false_value(); |
2384 } | 2385 } |
2385 | 2386 |
2386 | 2387 |
2387 } // namespace internal | 2388 } // namespace internal |
2388 } // namespace v8 | 2389 } // namespace v8 |
OLD | NEW |