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/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 stack_frame_info->set_line_number(0); | 2598 stack_frame_info->set_line_number(0); |
2599 stack_frame_info->set_column_number(0); | 2599 stack_frame_info->set_column_number(0); |
2600 stack_frame_info->set_script_id(0); | 2600 stack_frame_info->set_script_id(0); |
2601 stack_frame_info->set_script_name(Smi::kZero); | 2601 stack_frame_info->set_script_name(Smi::kZero); |
2602 stack_frame_info->set_script_name_or_source_url(Smi::kZero); | 2602 stack_frame_info->set_script_name_or_source_url(Smi::kZero); |
2603 stack_frame_info->set_function_name(Smi::kZero); | 2603 stack_frame_info->set_function_name(Smi::kZero); |
2604 stack_frame_info->set_flag(0); | 2604 stack_frame_info->set_flag(0); |
2605 return stack_frame_info; | 2605 return stack_frame_info; |
2606 } | 2606 } |
2607 | 2607 |
| 2608 Handle<SourcePositionTableWithFrameCache> |
| 2609 Factory::NewSourcePositionTableWithFrameCache( |
| 2610 Handle<ByteArray> source_position_table, |
| 2611 Handle<UnseededNumberDictionary> stack_frame_cache) { |
| 2612 Handle<SourcePositionTableWithFrameCache> |
| 2613 source_position_table_with_frame_cache = |
| 2614 Handle<SourcePositionTableWithFrameCache>::cast( |
| 2615 NewStruct(SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE)); |
| 2616 source_position_table_with_frame_cache->set_source_position_table( |
| 2617 *source_position_table); |
| 2618 source_position_table_with_frame_cache->set_stack_frame_cache( |
| 2619 *stack_frame_cache); |
| 2620 return source_position_table_with_frame_cache; |
| 2621 } |
| 2622 |
2608 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, | 2623 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, |
2609 int length) { | 2624 int length) { |
2610 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || | 2625 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || |
2611 !callee->shared()->has_simple_parameters(); | 2626 !callee->shared()->has_simple_parameters(); |
2612 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() | 2627 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() |
2613 : isolate()->sloppy_arguments_map(); | 2628 : isolate()->sloppy_arguments_map(); |
2614 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), | 2629 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), |
2615 false); | 2630 false); |
2616 DCHECK(!isolate()->has_pending_exception()); | 2631 DCHECK(!isolate()->has_pending_exception()); |
2617 Handle<JSObject> result = NewJSObjectFromMap(map); | 2632 Handle<JSObject> result = NewJSObjectFromMap(map); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2904 Handle<AccessorInfo> prototype = | 2919 Handle<AccessorInfo> prototype = |
2905 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2920 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
2906 Descriptor d = Descriptor::AccessorConstant( | 2921 Descriptor d = Descriptor::AccessorConstant( |
2907 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2922 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
2908 map->AppendDescriptor(&d); | 2923 map->AppendDescriptor(&d); |
2909 } | 2924 } |
2910 } | 2925 } |
2911 | 2926 |
2912 } // namespace internal | 2927 } // namespace internal |
2913 } // namespace v8 | 2928 } // namespace v8 |
OLD | NEW |