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 #include "src/type-feedback-vector.h" | 10 #include "src/type-feedback-vector.h" |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 bool is_debug = false); | 579 bool is_debug = false); |
580 | 580 |
581 Handle<Code> CopyCode(Handle<Code> code); | 581 Handle<Code> CopyCode(Handle<Code> code); |
582 | 582 |
583 Handle<BytecodeArray> CopyBytecodeArray(Handle<BytecodeArray>); | 583 Handle<BytecodeArray> CopyBytecodeArray(Handle<BytecodeArray>); |
584 | 584 |
585 // Interface for creating error objects. | 585 // Interface for creating error objects. |
586 Handle<Object> NewError(Handle<JSFunction> constructor, | 586 Handle<Object> NewError(Handle<JSFunction> constructor, |
587 Handle<String> message); | 587 Handle<String> message); |
588 | 588 |
589 Handle<Object> NewInvalidStringLengthError(); | 589 Handle<Object> NewInvalidStringLengthError() { |
| 590 return NewRangeError(MessageTemplate::kInvalidStringLength); |
| 591 } |
590 | 592 |
591 Handle<Object> NewURIError() { | 593 Handle<Object> NewURIError() { |
592 return NewError(isolate()->uri_error_function(), | 594 return NewError(isolate()->uri_error_function(), |
593 MessageTemplate::kURIMalformed); | 595 MessageTemplate::kURIMalformed); |
594 } | 596 } |
595 | 597 |
596 Handle<Object> NewError(Handle<JSFunction> constructor, | 598 Handle<Object> NewError(Handle<JSFunction> constructor, |
597 MessageTemplate::Template template_index, | 599 MessageTemplate::Template template_index, |
598 Handle<Object> arg0 = Handle<Object>(), | 600 Handle<Object> arg0 = Handle<Object>(), |
599 Handle<Object> arg1 = Handle<Object>(), | 601 Handle<Object> arg1 = Handle<Object>(), |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 FunctionMode function_mode); | 760 FunctionMode function_mode); |
759 | 761 |
760 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 762 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
761 FunctionMode function_mode); | 763 FunctionMode function_mode); |
762 }; | 764 }; |
763 | 765 |
764 } // namespace internal | 766 } // namespace internal |
765 } // namespace v8 | 767 } // namespace v8 |
766 | 768 |
767 #endif // V8_FACTORY_H_ | 769 #endif // V8_FACTORY_H_ |
OLD | NEW |