| 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 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
| 6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
| 7 | 7 |
| 8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
| 9 #include "src/messages.h" | 9 #include "src/messages.h" |
| 10 | 10 |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 #undef SYMBOL_ACCESSOR | 615 #undef SYMBOL_ACCESSOR |
| 616 | 616 |
| 617 #define SYMBOL_ACCESSOR(name, varname, description) \ | 617 #define SYMBOL_ACCESSOR(name, varname, description) \ |
| 618 inline Handle<Symbol> name() { \ | 618 inline Handle<Symbol> name() { \ |
| 619 return Handle<Symbol>(bit_cast<Symbol**>( \ | 619 return Handle<Symbol>(bit_cast<Symbol**>( \ |
| 620 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ | 620 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ |
| 621 } | 621 } |
| 622 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) | 622 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) |
| 623 #undef SYMBOL_ACCESSOR | 623 #undef SYMBOL_ACCESSOR |
| 624 | 624 |
| 625 inline void set_string_table(Handle<StringTable> table) { | |
| 626 isolate()->heap()->set_string_table(*table); | |
| 627 } | |
| 628 | |
| 629 inline void set_weak_stack_trace_list(Handle<WeakFixedArray> list) { | |
| 630 isolate()->heap()->set_weak_stack_trace_list(*list); | |
| 631 } | |
| 632 | |
| 633 // Allocates a new SharedFunctionInfo object. | 625 // Allocates a new SharedFunctionInfo object. |
| 634 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 626 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| 635 Handle<String> name, int number_of_literals, FunctionKind kind, | 627 Handle<String> name, int number_of_literals, FunctionKind kind, |
| 636 Handle<Code> code, Handle<ScopeInfo> scope_info, | 628 Handle<Code> code, Handle<ScopeInfo> scope_info, |
| 637 Handle<TypeFeedbackVector> feedback_vector); | 629 Handle<TypeFeedbackVector> feedback_vector); |
| 638 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, | 630 Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name, |
| 639 MaybeHandle<Code> code); | 631 MaybeHandle<Code> code); |
| 640 | 632 |
| 641 // Allocate a new type feedback vector | 633 // Allocate a new type feedback vector |
| 642 template <typename Spec> | 634 template <typename Spec> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 720 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 729 // size, but keeping the original prototype. The receiver must have at least | 721 // size, but keeping the original prototype. The receiver must have at least |
| 730 // the size of the new object. The object is reinitialized and behaves as an | 722 // the size of the new object. The object is reinitialized and behaves as an |
| 731 // object that has been freshly allocated. | 723 // object that has been freshly allocated. |
| 732 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 724 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 733 }; | 725 }; |
| 734 | 726 |
| 735 } } // namespace v8::internal | 727 } } // namespace v8::internal |
| 736 | 728 |
| 737 #endif // V8_FACTORY_H_ | 729 #endif // V8_FACTORY_H_ |
| OLD | NEW |