| 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/conversions.h" | 8 #include "src/conversions.h" |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 } | 657 } |
| 658 | 658 |
| 659 | 659 |
| 660 Handle<Symbol> Factory::NewPrivateSymbol() { | 660 Handle<Symbol> Factory::NewPrivateSymbol() { |
| 661 Handle<Symbol> symbol = NewSymbol(); | 661 Handle<Symbol> symbol = NewSymbol(); |
| 662 symbol->set_is_private(true); | 662 symbol->set_is_private(true); |
| 663 return symbol; | 663 return symbol; |
| 664 } | 664 } |
| 665 | 665 |
| 666 | 666 |
| 667 Handle<Symbol> Factory::NewPrivateOwnSymbol() { |
| 668 Handle<Symbol> symbol = NewSymbol(); |
| 669 symbol->set_is_private(true); |
| 670 symbol->set_is_own(true); |
| 671 return symbol; |
| 672 } |
| 673 |
| 674 |
| 667 Handle<Context> Factory::NewNativeContext() { | 675 Handle<Context> Factory::NewNativeContext() { |
| 668 Handle<FixedArray> array = NewFixedArray(Context::NATIVE_CONTEXT_SLOTS); | 676 Handle<FixedArray> array = NewFixedArray(Context::NATIVE_CONTEXT_SLOTS); |
| 669 array->set_map_no_write_barrier(*native_context_map()); | 677 array->set_map_no_write_barrier(*native_context_map()); |
| 670 Handle<Context> context = Handle<Context>::cast(array); | 678 Handle<Context> context = Handle<Context>::cast(array); |
| 671 context->set_js_array_maps(*undefined_value()); | 679 context->set_js_array_maps(*undefined_value()); |
| 672 DCHECK(context->IsNativeContext()); | 680 DCHECK(context->IsNativeContext()); |
| 673 return context; | 681 return context; |
| 674 } | 682 } |
| 675 | 683 |
| 676 | 684 |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 return Handle<Object>::null(); | 2375 return Handle<Object>::null(); |
| 2368 } | 2376 } |
| 2369 | 2377 |
| 2370 | 2378 |
| 2371 Handle<Object> Factory::ToBoolean(bool value) { | 2379 Handle<Object> Factory::ToBoolean(bool value) { |
| 2372 return value ? true_value() : false_value(); | 2380 return value ? true_value() : false_value(); |
| 2373 } | 2381 } |
| 2374 | 2382 |
| 2375 | 2383 |
| 2376 } } // namespace v8::internal | 2384 } } // namespace v8::internal |
| OLD | NEW |