| 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 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 #undef STRUCT_MAP_ACCESSOR | 581 #undef STRUCT_MAP_ACCESSOR |
| 582 | 582 |
| 583 #define STRING_ACCESSOR(name, str) \ | 583 #define STRING_ACCESSOR(name, str) \ |
| 584 inline Handle<String> name() { \ | 584 inline Handle<String> name() { \ |
| 585 return Handle<String>(bit_cast<String**>( \ | 585 return Handle<String>(bit_cast<String**>( \ |
| 586 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ | 586 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ |
| 587 } | 587 } |
| 588 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) | 588 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) |
| 589 #undef STRING_ACCESSOR | 589 #undef STRING_ACCESSOR |
| 590 | 590 |
| 591 #define SYMBOL_ACCESSOR(name) \ |
| 592 inline Handle<Symbol> name() { \ |
| 593 return Handle<Symbol>(bit_cast<Symbol**>( \ |
| 594 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ |
| 595 } |
| 596 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) |
| 597 #undef SYMBOL_ACCESSOR |
| 598 |
| 591 inline void set_string_table(Handle<StringTable> table) { | 599 inline void set_string_table(Handle<StringTable> table) { |
| 592 isolate()->heap()->set_string_table(*table); | 600 isolate()->heap()->set_string_table(*table); |
| 593 } | 601 } |
| 594 | 602 |
| 595 Handle<String> hidden_string() { | 603 Handle<String> hidden_string() { |
| 596 return Handle<String>(&isolate()->heap()->hidden_string_); | 604 return Handle<String>(&isolate()->heap()->hidden_string_); |
| 597 } | 605 } |
| 598 | 606 |
| 599 // Allocates a new SharedFunctionInfo object. | 607 // Allocates a new SharedFunctionInfo object. |
| 600 Handle<SharedFunctionInfo> NewSharedFunctionInfo( | 608 Handle<SharedFunctionInfo> NewSharedFunctionInfo( |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 708 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 701 // size, but keeping the original prototype. The receiver must have at least | 709 // size, but keeping the original prototype. The receiver must have at least |
| 702 // the size of the new object. The object is reinitialized and behaves as an | 710 // the size of the new object. The object is reinitialized and behaves as an |
| 703 // object that has been freshly allocated. | 711 // object that has been freshly allocated. |
| 704 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 712 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 705 }; | 713 }; |
| 706 | 714 |
| 707 } } // namespace v8::internal | 715 } } // namespace v8::internal |
| 708 | 716 |
| 709 #endif // V8_FACTORY_H_ | 717 #endif // V8_FACTORY_H_ |
| OLD | NEW |