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

Side by Side Diff: src/factory.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: rebased 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
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 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2607 2607
2608 Handle<StackTraceInfo> Factory::NewStackTraceInfo( 2608 Handle<StackTraceInfo> Factory::NewStackTraceInfo(
2609 Handle<FixedArray> frames, StackTrace::StackTraceOptions options) { 2609 Handle<FixedArray> frames, StackTrace::StackTraceOptions options) {
2610 Handle<StackTraceInfo> stack_trace_info = 2610 Handle<StackTraceInfo> stack_trace_info =
2611 Handle<StackTraceInfo>::cast(NewStruct(STACK_TRACE_INFO_TYPE)); 2611 Handle<StackTraceInfo>::cast(NewStruct(STACK_TRACE_INFO_TYPE));
2612 stack_trace_info->set_frames(*frames); 2612 stack_trace_info->set_frames(*frames);
2613 stack_trace_info->set_options(options); 2613 stack_trace_info->set_options(options);
2614 return stack_trace_info; 2614 return stack_trace_info;
2615 } 2615 }
2616 2616
2617 Handle<SourcePositionTableWithFrameCache>
2618 Factory::NewSourcePositionTableWithFrameCache(
2619 Handle<ByteArray> source_position_table,
2620 Handle<UnseededNumberDictionary> stack_frame_cache) {
2621 Handle<SourcePositionTableWithFrameCache>
2622 source_position_table_with_frame_cache =
2623 Handle<SourcePositionTableWithFrameCache>::cast(
2624 NewStruct(SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE));
2625 source_position_table_with_frame_cache->set_source_position_table(
2626 *source_position_table);
2627 source_position_table_with_frame_cache->set_stack_frame_cache(
2628 *stack_frame_cache);
2629 return source_position_table_with_frame_cache;
2630 }
2631
2617 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, 2632 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee,
2618 int length) { 2633 int length) {
2619 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || 2634 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) ||
2620 !callee->shared()->has_simple_parameters(); 2635 !callee->shared()->has_simple_parameters();
2621 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() 2636 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map()
2622 : isolate()->sloppy_arguments_map(); 2637 : isolate()->sloppy_arguments_map();
2623 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), 2638 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(),
2624 false); 2639 false);
2625 DCHECK(!isolate()->has_pending_exception()); 2640 DCHECK(!isolate()->has_pending_exception());
2626 Handle<JSObject> result = NewJSObjectFromMap(map); 2641 Handle<JSObject> result = NewJSObjectFromMap(map);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 Handle<AccessorInfo> prototype = 2928 Handle<AccessorInfo> prototype =
2914 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); 2929 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
2915 Descriptor d = Descriptor::AccessorConstant( 2930 Descriptor d = Descriptor::AccessorConstant(
2916 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); 2931 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs);
2917 map->AppendDescriptor(&d); 2932 map->AppendDescriptor(&d);
2918 } 2933 }
2919 } 2934 }
2920 2935
2921 } // namespace internal 2936 } // namespace internal
2922 } // namespace v8 2937 } // namespace v8
OLDNEW
« src/api.cc ('K') | « src/factory.h ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698