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

Side by Side Diff: src/js/regexp.js

Issue 1531843003: Rename IS_SPEC_OBJECT macro to IS_RECEIVER. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/js/proxy.js ('k') | src/js/string-iterator.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 (function(global, utils) { 5 (function(global, utils) {
6 6
7 %CheckIsBootstrapping(); 7 %CheckIsBootstrapping();
8 8
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 // Imports 10 // Imports
(...skipping 28 matching lines...) Expand all
39 2, // REGEXP_NUMBER_OF_CAPTURES 39 2, // REGEXP_NUMBER_OF_CAPTURES
40 "", // Last subject. 40 "", // Last subject.
41 UNDEFINED, // Last input - settable with RegExpSetInput. 41 UNDEFINED, // Last input - settable with RegExpSetInput.
42 0, // REGEXP_FIRST_CAPTURE + 0 42 0, // REGEXP_FIRST_CAPTURE + 0
43 0 // REGEXP_FIRST_CAPTURE + 1 43 0 // REGEXP_FIRST_CAPTURE + 1
44 ); 44 );
45 45
46 // ------------------------------------------------------------------- 46 // -------------------------------------------------------------------
47 47
48 function IsRegExp(o) { 48 function IsRegExp(o) {
49 if (!IS_SPEC_OBJECT(o)) return false; 49 if (!IS_RECEIVER(o)) return false;
50 var is_regexp = o[matchSymbol]; 50 var is_regexp = o[matchSymbol];
51 if (!IS_UNDEFINED(is_regexp)) return TO_BOOLEAN(is_regexp); 51 if (!IS_UNDEFINED(is_regexp)) return TO_BOOLEAN(is_regexp);
52 return IS_REGEXP(o); 52 return IS_REGEXP(o);
53 } 53 }
54 54
55 55
56 // ES6 section 21.2.3.2.2 56 // ES6 section 21.2.3.2.2
57 function RegExpInitialize(object, pattern, flags) { 57 function RegExpInitialize(object, pattern, flags) {
58 pattern = IS_UNDEFINED(pattern) ? '' : TO_STRING(pattern); 58 pattern = IS_UNDEFINED(pattern) ? '' : TO_STRING(pattern);
59 flags = IS_UNDEFINED(flags) ? '' : TO_STRING(flags); 59 flags = IS_UNDEFINED(flags) ? '' : TO_STRING(flags);
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // Exports 563 // Exports
564 564
565 utils.Export(function(to) { 565 utils.Export(function(to) {
566 to.RegExpExec = DoRegExpExec; 566 to.RegExpExec = DoRegExpExec;
567 to.RegExpExecNoTests = RegExpExecNoTests; 567 to.RegExpExecNoTests = RegExpExecNoTests;
568 to.RegExpLastMatchInfo = RegExpLastMatchInfo; 568 to.RegExpLastMatchInfo = RegExpLastMatchInfo;
569 to.RegExpTest = RegExpTest; 569 to.RegExpTest = RegExpTest;
570 }); 570 });
571 571
572 }) 572 })
OLDNEW
« no previous file with comments | « src/js/proxy.js ('k') | src/js/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698