| 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 if (name->IsString()) { | 682 if (name->IsString()) { |
| 683 symbol->set_name(*name); | 683 symbol->set_name(*name); |
| 684 } else { | 684 } else { |
| 685 DCHECK(name->IsUndefined()); | 685 DCHECK(name->IsUndefined()); |
| 686 } | 686 } |
| 687 return symbol; | 687 return symbol; |
| 688 } | 688 } |
| 689 | 689 |
| 690 | 690 |
| 691 Handle<Context> Factory::NewNativeContext() { | 691 Handle<Context> Factory::NewNativeContext() { |
| 692 Handle<FixedArray> array = NewFixedArray(Context::NATIVE_CONTEXT_SLOTS); | 692 Handle<FixedArray> array = |
| 693 NewFixedArray(Context::NATIVE_CONTEXT_SLOTS, TENURED); |
| 693 array->set_map_no_write_barrier(*native_context_map()); | 694 array->set_map_no_write_barrier(*native_context_map()); |
| 694 Handle<Context> context = Handle<Context>::cast(array); | 695 Handle<Context> context = Handle<Context>::cast(array); |
| 695 context->set_js_array_maps(*undefined_value()); | 696 context->set_js_array_maps(*undefined_value()); |
| 696 DCHECK(context->IsNativeContext()); | 697 DCHECK(context->IsNativeContext()); |
| 697 return context; | 698 return context; |
| 698 } | 699 } |
| 699 | 700 |
| 700 | 701 |
| 701 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function, | 702 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function, |
| 702 Handle<ScopeInfo> scope_info) { | 703 Handle<ScopeInfo> scope_info) { |
| (...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 } | 2431 } |
| 2431 | 2432 |
| 2432 | 2433 |
| 2433 Handle<Object> Factory::ToBoolean(bool value) { | 2434 Handle<Object> Factory::ToBoolean(bool value) { |
| 2434 return value ? true_value() : false_value(); | 2435 return value ? true_value() : false_value(); |
| 2435 } | 2436 } |
| 2436 | 2437 |
| 2437 | 2438 |
| 2438 } // namespace internal | 2439 } // namespace internal |
| 2439 } // namespace v8 | 2440 } // namespace v8 |
| OLD | NEW |