Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/factory.h

Issue 1968953002: [runtime] Implement encodeURI as single runtime function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove code duplication Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bignum.cc ('k') | src/js/uri.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 Handle<BytecodeArray> CopyBytecodeArray(Handle<BytecodeArray>); 553 Handle<BytecodeArray> CopyBytecodeArray(Handle<BytecodeArray>);
554 554
555 // Interface for creating error objects. 555 // Interface for creating error objects.
556 Handle<Object> NewError(Handle<JSFunction> constructor, 556 Handle<Object> NewError(Handle<JSFunction> constructor,
557 Handle<String> message); 557 Handle<String> message);
558 558
559 Handle<Object> NewInvalidStringLengthError() { 559 Handle<Object> NewInvalidStringLengthError() {
560 return NewRangeError(MessageTemplate::kInvalidStringLength); 560 return NewRangeError(MessageTemplate::kInvalidStringLength);
561 } 561 }
562 562
563 Handle<Object> NewURIError() {
564 return NewError(isolate()->uri_error_function(),
565 MessageTemplate::kURIMalformed);
566 }
567
563 Handle<Object> NewError(Handle<JSFunction> constructor, 568 Handle<Object> NewError(Handle<JSFunction> constructor,
564 MessageTemplate::Template template_index, 569 MessageTemplate::Template template_index,
565 Handle<Object> arg0 = Handle<Object>(), 570 Handle<Object> arg0 = Handle<Object>(),
566 Handle<Object> arg1 = Handle<Object>(), 571 Handle<Object> arg1 = Handle<Object>(),
567 Handle<Object> arg2 = Handle<Object>()); 572 Handle<Object> arg2 = Handle<Object>());
568 573
569 #define DECLARE_ERROR(NAME) \ 574 #define DECLARE_ERROR(NAME) \
570 Handle<Object> New##NAME(MessageTemplate::Template template_index, \ 575 Handle<Object> New##NAME(MessageTemplate::Template template_index, \
571 Handle<Object> arg0 = Handle<Object>(), \ 576 Handle<Object> arg0 = Handle<Object>(), \
572 Handle<Object> arg1 = Handle<Object>(), \ 577 Handle<Object> arg1 = Handle<Object>(), \
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 714
710 // Create a JSArray with no elements and no length. 715 // Create a JSArray with no elements and no length.
711 Handle<JSArray> NewJSArray(ElementsKind elements_kind, 716 Handle<JSArray> NewJSArray(ElementsKind elements_kind,
712 PretenureFlag pretenure = NOT_TENURED); 717 PretenureFlag pretenure = NOT_TENURED);
713 }; 718 };
714 719
715 } // namespace internal 720 } // namespace internal
716 } // namespace v8 721 } // namespace v8
717 722
718 #endif // V8_FACTORY_H_ 723 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/bignum.cc ('k') | src/js/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698