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

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

Issue 1463083004: Change IS_OBJECT back to typeof == "object" and use IS_SPEC_OBJECT in Array.from and RegExp (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/macros.py ('k') | no next file » | 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 27 matching lines...) Expand all
38 2, // REGEXP_NUMBER_OF_CAPTURES 38 2, // REGEXP_NUMBER_OF_CAPTURES
39 "", // Last subject. 39 "", // Last subject.
40 UNDEFINED, // Last input - settable with RegExpSetInput. 40 UNDEFINED, // Last input - settable with RegExpSetInput.
41 0, // REGEXP_FIRST_CAPTURE + 0 41 0, // REGEXP_FIRST_CAPTURE + 0
42 0 // REGEXP_FIRST_CAPTURE + 1 42 0 // REGEXP_FIRST_CAPTURE + 1
43 ); 43 );
44 44
45 // ------------------------------------------------------------------- 45 // -------------------------------------------------------------------
46 46
47 function IsRegExp(o) { 47 function IsRegExp(o) {
48 if (!IS_OBJECT(o)) return false; 48 if (!IS_SPEC_OBJECT(o)) return false;
49 var is_regexp = o[matchSymbol]; 49 var is_regexp = o[matchSymbol];
50 if (!IS_UNDEFINED(is_regexp)) return TO_BOOLEAN(is_regexp); 50 if (!IS_UNDEFINED(is_regexp)) return TO_BOOLEAN(is_regexp);
51 return IS_REGEXP(o); 51 return IS_REGEXP(o);
52 } 52 }
53 53
54 54
55 // ES6 section 21.2.3.2.2 55 // ES6 section 21.2.3.2.2
56 function RegExpInitialize(object, pattern, flags) { 56 function RegExpInitialize(object, pattern, flags) {
57 pattern = IS_UNDEFINED(pattern) ? '' : TO_STRING(pattern); 57 pattern = IS_UNDEFINED(pattern) ? '' : TO_STRING(pattern);
58 flags = IS_UNDEFINED(flags) ? '' : TO_STRING(flags); 58 flags = IS_UNDEFINED(flags) ? '' : TO_STRING(flags);
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Exports 532 // Exports
533 533
534 utils.Export(function(to) { 534 utils.Export(function(to) {
535 to.RegExpExec = DoRegExpExec; 535 to.RegExpExec = DoRegExpExec;
536 to.RegExpExecNoTests = RegExpExecNoTests; 536 to.RegExpExecNoTests = RegExpExecNoTests;
537 to.RegExpLastMatchInfo = RegExpLastMatchInfo; 537 to.RegExpLastMatchInfo = RegExpLastMatchInfo;
538 to.RegExpTest = RegExpTest; 538 to.RegExpTest = RegExpTest;
539 }); 539 });
540 540
541 }) 541 })
OLDNEW
« no previous file with comments | « src/js/macros.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698