Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1882)

Side by Side Diff: src/factory.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: reverted v8-debugger change Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698