| 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 | 10 |
| 10 namespace v8 { | 11 namespace v8 { |
| 11 namespace internal { | 12 namespace internal { |
| 12 | 13 |
| 13 class FeedbackVectorSpec; | 14 class FeedbackVectorSpec; |
| 14 | 15 |
| 15 // Interface for handle based allocation. | 16 // Interface for handle based allocation. |
| 16 class Factory FINAL { | 17 class Factory FINAL { |
| 17 public: | 18 public: |
| 18 Handle<Oddball> NewOddball(Handle<Map> map, | 19 Handle<Oddball> NewOddball(Handle<Map> map, |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); | 530 Handle<Code> CopyCode(Handle<Code> code, Vector<byte> reloc_info); |
| 530 | 531 |
| 531 // Interface for creating error objects. | 532 // Interface for creating error objects. |
| 532 | 533 |
| 533 Handle<Object> NewError(const char* maker, const char* message, | 534 Handle<Object> NewError(const char* maker, const char* message, |
| 534 Handle<JSArray> args); | 535 Handle<JSArray> args); |
| 535 Handle<String> EmergencyNewError(const char* message, Handle<JSArray> args); | 536 Handle<String> EmergencyNewError(const char* message, Handle<JSArray> args); |
| 536 Handle<Object> NewError(const char* maker, const char* message, | 537 Handle<Object> NewError(const char* maker, const char* message, |
| 537 Vector<Handle<Object> > args); | 538 Vector<Handle<Object> > args); |
| 538 Handle<Object> NewError(const char* message, Vector<Handle<Object> > args); | 539 Handle<Object> NewError(const char* message, Vector<Handle<Object> > args); |
| 540 Handle<Object> NewError(const char* maker, |
| 541 MessageTemplate::Template template_index, |
| 542 Handle<Object> arg0, Handle<Object> arg1, |
| 543 Handle<Object> arg2); |
| 544 |
| 539 Handle<Object> NewError(Handle<String> message); | 545 Handle<Object> NewError(Handle<String> message); |
| 540 Handle<Object> NewError(const char* constructor, Handle<String> message); | 546 Handle<Object> NewError(const char* constructor, Handle<String> message); |
| 541 | 547 |
| 542 Handle<Object> NewTypeError(const char* message, | 548 Handle<Object> NewTypeError(const char* message, |
| 543 Vector<Handle<Object> > args); | 549 Vector<Handle<Object> > args); |
| 550 Handle<Object> NewTypeError(MessageTemplate::Template template_index, |
| 551 Handle<Object> arg0 = Handle<Object>(), |
| 552 Handle<Object> arg1 = Handle<Object>(), |
| 553 Handle<Object> arg2 = Handle<Object>()); |
| 544 Handle<Object> NewTypeError(Handle<String> message); | 554 Handle<Object> NewTypeError(Handle<String> message); |
| 545 | 555 |
| 546 Handle<Object> NewRangeError(const char* message, | 556 Handle<Object> NewRangeError(const char* message, |
| 547 Vector<Handle<Object> > args); | 557 Vector<Handle<Object> > args); |
| 548 Handle<Object> NewRangeError(Handle<String> message); | 558 Handle<Object> NewRangeError(Handle<String> message); |
| 549 | 559 |
| 550 Handle<Object> NewInvalidStringLengthError() { | 560 Handle<Object> NewInvalidStringLengthError() { |
| 551 return NewRangeError("invalid_string_length", | 561 return NewRangeError("invalid_string_length", |
| 552 HandleVector<Object>(NULL, 0)); | 562 HandleVector<Object>(NULL, 0)); |
| 553 } | 563 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 728 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 719 // size, but keeping the original prototype. The receiver must have at least | 729 // size, but keeping the original prototype. The receiver must have at least |
| 720 // the size of the new object. The object is reinitialized and behaves as an | 730 // the size of the new object. The object is reinitialized and behaves as an |
| 721 // object that has been freshly allocated. | 731 // object that has been freshly allocated. |
| 722 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 732 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 723 }; | 733 }; |
| 724 | 734 |
| 725 } } // namespace v8::internal | 735 } } // namespace v8::internal |
| 726 | 736 |
| 727 #endif // V8_FACTORY_H_ | 737 #endif // V8_FACTORY_H_ |
| OLD | NEW |