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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 script->set_line_ends(heap->undefined_value()); | 910 script->set_line_ends(heap->undefined_value()); |
911 script->set_eval_from_shared(heap->undefined_value()); | 911 script->set_eval_from_shared(heap->undefined_value()); |
912 script->set_eval_from_position(0); | 912 script->set_eval_from_position(0); |
913 script->set_shared_function_infos(Smi::FromInt(0)); | 913 script->set_shared_function_infos(Smi::FromInt(0)); |
914 script->set_flags(0); | 914 script->set_flags(0); |
915 | 915 |
916 heap->set_script_list(*WeakFixedArray::Add(script_list(), script)); | 916 heap->set_script_list(*WeakFixedArray::Add(script_list(), script)); |
917 return script; | 917 return script; |
918 } | 918 } |
919 | 919 |
920 Handle<StackTraceFrame> Factory::NewStackTraceFrame() { | |
921 Handle<StackTraceFrame> frame = | |
922 Handle<StackTraceFrame>::cast(NewStruct(STACK_TRACE_FRAME_TYPE)); | |
923 frame->set_flags(0); | |
924 frame->set_offset(0); | |
925 return frame; | |
926 } | |
927 | 920 |
928 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { | 921 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { |
929 CALL_HEAP_FUNCTION(isolate(), | 922 CALL_HEAP_FUNCTION(isolate(), |
930 isolate()->heap()->AllocateForeign(addr, pretenure), | 923 isolate()->heap()->AllocateForeign(addr, pretenure), |
931 Foreign); | 924 Foreign); |
932 } | 925 } |
933 | 926 |
934 | 927 |
935 Handle<Foreign> Factory::NewForeign(const AccessorDescriptor* desc) { | 928 Handle<Foreign> Factory::NewForeign(const AccessorDescriptor* desc) { |
936 return NewForeign((Address) desc, TENURED); | 929 return NewForeign((Address) desc, TENURED); |
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 Handle<AccessorInfo> prototype = | 2491 Handle<AccessorInfo> prototype = |
2499 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2492 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
2500 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2493 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
2501 prototype, attribs); | 2494 prototype, attribs); |
2502 map->AppendDescriptor(&d); | 2495 map->AppendDescriptor(&d); |
2503 } | 2496 } |
2504 } | 2497 } |
2505 | 2498 |
2506 } // namespace internal | 2499 } // namespace internal |
2507 } // namespace v8 | 2500 } // namespace v8 |
OLD | NEW |