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

Side by Side Diff: src/runtime.cc

Issue 7074009: Fix Win compilation issue introduced in r8081. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
5102 Isolate* isolate, 5102 Isolate* isolate,
5103 SinkChar* write_cursor, 5103 SinkChar* write_cursor,
5104 Vector<const SourceChar> characters) { 5104 Vector<const SourceChar> characters) {
5105 const SourceChar* read_cursor = characters.start(); 5105 const SourceChar* read_cursor = characters.start();
5106 const SourceChar* end = read_cursor + characters.length(); 5106 const SourceChar* end = read_cursor + characters.length();
5107 *(write_cursor++) = '"'; 5107 *(write_cursor++) = '"';
5108 while (read_cursor < end) { 5108 while (read_cursor < end) {
5109 SourceChar c = *(read_cursor++); 5109 SourceChar c = *(read_cursor++);
5110 if (sizeof(SourceChar) > 1u && 5110 if (sizeof(SourceChar) > 1u &&
5111 static_cast<unsigned>(c) >= kQuoteTableLength) { 5111 static_cast<unsigned>(c) >= kQuoteTableLength) {
5112 *(write_cursor++) = c; 5112 *(write_cursor++) = static_cast<SinkChar>(c);
Rico 2011/05/26 14:42:09 Well actually, consider making a comment why this
5113 } else { 5113 } else {
5114 int len = JsonQuoteLengths[static_cast<unsigned>(c)]; 5114 int len = JsonQuoteLengths[static_cast<unsigned>(c)];
5115 const char* replacement = JsonQuotes + 5115 const char* replacement = JsonQuotes +
5116 static_cast<unsigned>(c) * kJsonQuotesCharactersPerEntry; 5116 static_cast<unsigned>(c) * kJsonQuotesCharactersPerEntry;
5117 write_cursor[0] = replacement[0]; 5117 write_cursor[0] = replacement[0];
5118 if (len > 1) { 5118 if (len > 1) {
5119 write_cursor[1] = replacement[1]; 5119 write_cursor[1] = replacement[1];
5120 if (len > 2) { 5120 if (len > 2) {
5121 ASSERT(len == 6); 5121 ASSERT(len == 6);
5122 write_cursor[2] = replacement[2]; 5122 write_cursor[2] = replacement[2];
(...skipping 7200 matching lines...) Expand 10 before | Expand all | Expand 10 after
12323 } else { 12323 } else {
12324 // Handle last resort GC and make sure to allow future allocations 12324 // Handle last resort GC and make sure to allow future allocations
12325 // to grow the heap without causing GCs (if possible). 12325 // to grow the heap without causing GCs (if possible).
12326 isolate->counters()->gc_last_resort_from_js()->Increment(); 12326 isolate->counters()->gc_last_resort_from_js()->Increment();
12327 isolate->heap()->CollectAllGarbage(false); 12327 isolate->heap()->CollectAllGarbage(false);
12328 } 12328 }
12329 } 12329 }
12330 12330
12331 12331
12332 } } // namespace v8::internal 12332 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698