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 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 stack_frame_info->set_line_number(0); | 2613 stack_frame_info->set_line_number(0); |
2614 stack_frame_info->set_column_number(0); | 2614 stack_frame_info->set_column_number(0); |
2615 stack_frame_info->set_script_id(0); | 2615 stack_frame_info->set_script_id(0); |
2616 stack_frame_info->set_script_name(Smi::kZero); | 2616 stack_frame_info->set_script_name(Smi::kZero); |
2617 stack_frame_info->set_script_name_or_source_url(Smi::kZero); | 2617 stack_frame_info->set_script_name_or_source_url(Smi::kZero); |
2618 stack_frame_info->set_function_name(Smi::kZero); | 2618 stack_frame_info->set_function_name(Smi::kZero); |
2619 stack_frame_info->set_flag(0); | 2619 stack_frame_info->set_flag(0); |
2620 return stack_frame_info; | 2620 return stack_frame_info; |
2621 } | 2621 } |
2622 | 2622 |
| 2623 Handle<SourcePositionTableWithFrameCache> |
| 2624 Factory::NewSourcePositionTableWithFrameCache( |
| 2625 Handle<ByteArray> source_position_table, |
| 2626 Handle<UnseededNumberDictionary> stack_frame_cache) { |
| 2627 Handle<SourcePositionTableWithFrameCache> |
| 2628 source_position_table_with_frame_cache = |
| 2629 Handle<SourcePositionTableWithFrameCache>::cast( |
| 2630 NewStruct(TUPLE2_TYPE)); |
| 2631 source_position_table_with_frame_cache->set_source_position_table( |
| 2632 *source_position_table); |
| 2633 source_position_table_with_frame_cache->set_stack_frame_cache( |
| 2634 *stack_frame_cache); |
| 2635 return source_position_table_with_frame_cache; |
| 2636 } |
| 2637 |
2623 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, | 2638 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, |
2624 int length) { | 2639 int length) { |
2625 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || | 2640 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || |
2626 !callee->shared()->has_simple_parameters(); | 2641 !callee->shared()->has_simple_parameters(); |
2627 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() | 2642 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() |
2628 : isolate()->sloppy_arguments_map(); | 2643 : isolate()->sloppy_arguments_map(); |
2629 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), | 2644 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), |
2630 false); | 2645 false); |
2631 DCHECK(!isolate()->has_pending_exception()); | 2646 DCHECK(!isolate()->has_pending_exception()); |
2632 Handle<JSObject> result = NewJSObjectFromMap(map); | 2647 Handle<JSObject> result = NewJSObjectFromMap(map); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2919 Handle<AccessorInfo> prototype = | 2934 Handle<AccessorInfo> prototype = |
2920 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2935 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
2921 Descriptor d = Descriptor::AccessorConstant( | 2936 Descriptor d = Descriptor::AccessorConstant( |
2922 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2937 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
2923 map->AppendDescriptor(&d); | 2938 map->AppendDescriptor(&d); |
2924 } | 2939 } |
2925 } | 2940 } |
2926 | 2941 |
2927 } // namespace internal | 2942 } // namespace internal |
2928 } // namespace v8 | 2943 } // namespace v8 |
OLD | NEW |