| 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 } |
| 920 | 927 |
| 921 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { | 928 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { |
| 922 CALL_HEAP_FUNCTION(isolate(), | 929 CALL_HEAP_FUNCTION(isolate(), |
| 923 isolate()->heap()->AllocateForeign(addr, pretenure), | 930 isolate()->heap()->AllocateForeign(addr, pretenure), |
| 924 Foreign); | 931 Foreign); |
| 925 } | 932 } |
| 926 | 933 |
| 927 | 934 |
| 928 Handle<Foreign> Factory::NewForeign(const AccessorDescriptor* desc) { | 935 Handle<Foreign> Factory::NewForeign(const AccessorDescriptor* desc) { |
| 929 return NewForeign((Address) desc, TENURED); | 936 return NewForeign((Address) desc, TENURED); |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2491 Handle<AccessorInfo> prototype = | 2498 Handle<AccessorInfo> prototype = |
| 2492 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2499 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
| 2493 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2500 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
| 2494 prototype, attribs); | 2501 prototype, attribs); |
| 2495 map->AppendDescriptor(&d); | 2502 map->AppendDescriptor(&d); |
| 2496 } | 2503 } |
| 2497 } | 2504 } |
| 2498 | 2505 |
| 2499 } // namespace internal | 2506 } // namespace internal |
| 2500 } // namespace v8 | 2507 } // namespace v8 |
| OLD | NEW |