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

Side by Side Diff: src/messages.js

Issue 12217071: Combine %_SubString and %_StringCharAt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/json.js ('k') | src/regexp.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 var sourceUrlPattern = 555 var sourceUrlPattern =
556 /\/\/@[\040\t]sourceURL=[\040\t]*([^\s\'\"]*)[\040\t]*$/gm; 556 /\/\/@[\040\t]sourceURL=[\040\t]*([^\s\'\"]*)[\040\t]*$/gm;
557 // Don't reuse lastMatchInfo here, so we create a new array with room 557 // Don't reuse lastMatchInfo here, so we create a new array with room
558 // for four captures (array with length one longer than the index 558 // for four captures (array with length one longer than the index
559 // of the fourth capture, where the numbering is zero-based). 559 // of the fourth capture, where the numbering is zero-based).
560 var matchInfo = new InternalArray(CAPTURE(3) + 1); 560 var matchInfo = new InternalArray(CAPTURE(3) + 1);
561 var match = 561 var match =
562 %_RegExpExec(sourceUrlPattern, source, sourceUrlPos - 4, matchInfo); 562 %_RegExpExec(sourceUrlPattern, source, sourceUrlPos - 4, matchInfo);
563 if (match) { 563 if (match) {
564 this.cachedNameOrSourceURL = 564 this.cachedNameOrSourceURL =
565 SubString(source, matchInfo[CAPTURE(2)], matchInfo[CAPTURE(3)]); 565 %_SubString(source, matchInfo[CAPTURE(2)], matchInfo[CAPTURE(3)]);
566 } 566 }
567 } 567 }
568 return this.cachedNameOrSourceURL; 568 return this.cachedNameOrSourceURL;
569 } 569 }
570 570
571 571
572 SetUpLockedPrototype(Script, 572 SetUpLockedPrototype(Script,
573 $Array("source", "name", "line_ends", "line_offset", "column_offset", 573 $Array("source", "name", "line_ends", "line_offset", "column_offset",
574 "cachedNameOrSourceURL", "hasCachedNameOrSourceURL" ), 574 "cachedNameOrSourceURL", "hasCachedNameOrSourceURL" ),
575 $Array( 575 $Array(
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 %SetOverflowedStackTrace(this, void 0); 1301 %SetOverflowedStackTrace(this, void 0);
1302 } 1302 }
1303 1303
1304 %DefineOrRedefineAccessorProperty( 1304 %DefineOrRedefineAccessorProperty(
1305 boilerplate, 'stack', getter, setter, DONT_ENUM); 1305 boilerplate, 'stack', getter, setter, DONT_ENUM);
1306 1306
1307 return boilerplate; 1307 return boilerplate;
1308 } 1308 }
1309 1309
1310 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1310 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW
« no previous file with comments | « src/json.js ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698