| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 void ConfigureInstance(Handle<FunctionTemplateInfo> desc, | 455 void ConfigureInstance(Handle<FunctionTemplateInfo> desc, |
| 456 Handle<JSObject> instance, | 456 Handle<JSObject> instance, |
| 457 bool* pending_exception); | 457 bool* pending_exception); |
| 458 | 458 |
| 459 #define ROOT_ACCESSOR(type, name, camel_name) \ | 459 #define ROOT_ACCESSOR(type, name, camel_name) \ |
| 460 inline Handle<type> name() { \ | 460 inline Handle<type> name() { \ |
| 461 return Handle<type>(BitCast<type**>( \ | 461 return Handle<type>(BitCast<type**>( \ |
| 462 &isolate()->heap()->roots_[Heap::k##camel_name##RootIndex])); \ | 462 &isolate()->heap()->roots_[Heap::k##camel_name##RootIndex])); \ |
| 463 } | 463 } |
| 464 ROOT_LIST(ROOT_ACCESSOR) | 464 ROOT_LIST(ROOT_ACCESSOR) |
| 465 #undef ROOT_ACCESSOR_ACCESSOR | 465 #undef ROOT_ACCESSOR |
| 466 |
| 467 #define STRUCT_MAP_ACCESSOR(NAME, Name, name) \ |
| 468 inline Handle<Map> name##_map() { \ |
| 469 return Handle<Map>(BitCast<Map**>( \ |
| 470 &isolate()->heap()->roots_[Heap::k##Name##MapRootIndex])); \ |
| 471 } |
| 472 STRUCT_LIST(STRUCT_MAP_ACCESSOR) |
| 473 #undef STRUCT_MAP_ACCESSOR |
| 466 | 474 |
| 467 #define STRING_ACCESSOR(name, str) \ | 475 #define STRING_ACCESSOR(name, str) \ |
| 468 inline Handle<String> name() { \ | 476 inline Handle<String> name() { \ |
| 469 return Handle<String>(BitCast<String**>( \ | 477 return Handle<String>(BitCast<String**>( \ |
| 470 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ | 478 &isolate()->heap()->roots_[Heap::k##name##RootIndex])); \ |
| 471 } | 479 } |
| 472 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) | 480 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) |
| 473 #undef STRING_ACCESSOR | 481 #undef STRING_ACCESSOR |
| 474 | 482 |
| 475 Handle<String> hidden_string() { | 483 Handle<String> hidden_string() { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 666 } |
| 659 | 667 |
| 660 private: | 668 private: |
| 661 Isolate* isolate_; | 669 Isolate* isolate_; |
| 662 }; | 670 }; |
| 663 | 671 |
| 664 | 672 |
| 665 } } // namespace v8::internal | 673 } } // namespace v8::internal |
| 666 | 674 |
| 667 #endif // V8_FACTORY_H_ | 675 #endif // V8_FACTORY_H_ |
| OLD | NEW |