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

Side by Side Diff: src/factory.cc

Issue 2789073002: [inspector] store stack frame in struct instead of JSObject (Closed)
Patch Set: fixed wasm test 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') | src/isolate.cc » ('J')
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 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 } 2585 }
2586 2586
2587 Handle<BreakPointInfo> Factory::NewBreakPointInfo(int source_position) { 2587 Handle<BreakPointInfo> Factory::NewBreakPointInfo(int source_position) {
2588 Handle<BreakPointInfo> new_break_point_info = 2588 Handle<BreakPointInfo> new_break_point_info =
2589 Handle<BreakPointInfo>::cast(NewStruct(BREAK_POINT_INFO_TYPE)); 2589 Handle<BreakPointInfo>::cast(NewStruct(BREAK_POINT_INFO_TYPE));
2590 new_break_point_info->set_source_position(source_position); 2590 new_break_point_info->set_source_position(source_position);
2591 new_break_point_info->set_break_point_objects(*undefined_value()); 2591 new_break_point_info->set_break_point_objects(*undefined_value());
2592 return new_break_point_info; 2592 return new_break_point_info;
2593 } 2593 }
2594 2594
2595 Handle<StackFrameInfo> Factory::NewStackFrameInfo() {
2596 Handle<StackFrameInfo> stack_frame_info =
2597 Handle<StackFrameInfo>::cast(NewStruct(STACK_FRAME_INFO_TYPE));
2598 stack_frame_info->set_line_number(0);
2599 stack_frame_info->set_column_number(0);
2600 stack_frame_info->set_script_id(0);
2601 stack_frame_info->set_script_name(Smi::kZero);
2602 stack_frame_info->set_script_name_or_source_url(Smi::kZero);
2603 stack_frame_info->set_function_name(Smi::kZero);
2604 stack_frame_info->set_flag(0);
2605 return stack_frame_info;
2606 }
2607
2595 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, 2608 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee,
2596 int length) { 2609 int length) {
2597 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || 2610 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) ||
2598 !callee->shared()->has_simple_parameters(); 2611 !callee->shared()->has_simple_parameters();
2599 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() 2612 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map()
2600 : isolate()->sloppy_arguments_map(); 2613 : isolate()->sloppy_arguments_map();
2601 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), 2614 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(),
2602 false); 2615 false);
2603 DCHECK(!isolate()->has_pending_exception()); 2616 DCHECK(!isolate()->has_pending_exception());
2604 Handle<JSObject> result = NewJSObjectFromMap(map); 2617 Handle<JSObject> result = NewJSObjectFromMap(map);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 Handle<AccessorInfo> prototype = 2904 Handle<AccessorInfo> prototype =
2892 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); 2905 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
2893 Descriptor d = Descriptor::AccessorConstant( 2906 Descriptor d = Descriptor::AccessorConstant(
2894 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); 2907 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs);
2895 map->AppendDescriptor(&d); 2908 map->AppendDescriptor(&d);
2896 } 2909 }
2897 } 2910 }
2898 2911
2899 } // namespace internal 2912 } // namespace internal
2900 } // namespace v8 2913 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698