| 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 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 debug_info->set_shared(*shared); | 2471 debug_info->set_shared(*shared); |
| 2472 debug_info->set_debug_bytecode_array(*maybe_debug_bytecode_array); | 2472 debug_info->set_debug_bytecode_array(*maybe_debug_bytecode_array); |
| 2473 debug_info->set_break_points(*break_points); | 2473 debug_info->set_break_points(*break_points); |
| 2474 | 2474 |
| 2475 // Link debug info to function. | 2475 // Link debug info to function. |
| 2476 shared->set_debug_info(*debug_info); | 2476 shared->set_debug_info(*debug_info); |
| 2477 | 2477 |
| 2478 return debug_info; | 2478 return debug_info; |
| 2479 } | 2479 } |
| 2480 | 2480 |
| 2481 Handle<BreakPointInfo> Factory::NewBreakPointInfo(int source_position) { |
| 2482 Handle<BreakPointInfo> new_break_point_info = |
| 2483 Handle<BreakPointInfo>::cast(NewStruct(BREAK_POINT_INFO_TYPE)); |
| 2484 new_break_point_info->set_source_position(source_position); |
| 2485 new_break_point_info->set_break_point_objects(*undefined_value()); |
| 2486 return new_break_point_info; |
| 2487 } |
| 2481 | 2488 |
| 2482 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, | 2489 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, |
| 2483 int length) { | 2490 int length) { |
| 2484 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || | 2491 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || |
| 2485 !callee->shared()->has_simple_parameters(); | 2492 !callee->shared()->has_simple_parameters(); |
| 2486 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() | 2493 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() |
| 2487 : isolate()->sloppy_arguments_map(); | 2494 : isolate()->sloppy_arguments_map(); |
| 2488 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), | 2495 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), |
| 2489 false); | 2496 false); |
| 2490 DCHECK(!isolate()->has_pending_exception()); | 2497 DCHECK(!isolate()->has_pending_exception()); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 Handle<AccessorInfo> prototype = | 2785 Handle<AccessorInfo> prototype = |
| 2779 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2786 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
| 2780 Descriptor d = Descriptor::AccessorConstant( | 2787 Descriptor d = Descriptor::AccessorConstant( |
| 2781 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2788 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
| 2782 map->AppendDescriptor(&d); | 2789 map->AppendDescriptor(&d); |
| 2783 } | 2790 } |
| 2784 } | 2791 } |
| 2785 | 2792 |
| 2786 } // namespace internal | 2793 } // namespace internal |
| 2787 } // namespace v8 | 2794 } // namespace v8 |
| OLD | NEW |