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

Side by Side Diff: src/conversions.cc

Issue 2864032: [Isolates] Statics 7: ExternalReference*/Simulator/dtoa... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: rebase Created 10 years, 5 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/arm/simulator-arm.cc ('k') | src/dtoa-config.c » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 if (decimal_pos > 0) result_size++; 1147 if (decimal_pos > 0) result_size++;
1148 // Allocate result and fill in the parts. 1148 // Allocate result and fill in the parts.
1149 StringBuilder builder(result_size + 1); 1149 StringBuilder builder(result_size + 1);
1150 builder.AddSubstring(integer_buffer + integer_pos + 1, integer_part_size); 1150 builder.AddSubstring(integer_buffer + integer_pos + 1, integer_part_size);
1151 if (decimal_pos > 0) builder.AddCharacter('.'); 1151 if (decimal_pos > 0) builder.AddCharacter('.');
1152 builder.AddSubstring(decimal_buffer, decimal_pos); 1152 builder.AddSubstring(decimal_buffer, decimal_pos);
1153 return builder.Finalize(); 1153 return builder.Finalize();
1154 } 1154 }
1155 1155
1156 1156
1157 static Mutex* dtoa_lock_one = OS::CreateMutex();
1158 static Mutex* dtoa_lock_zero = OS::CreateMutex();
1159
1160
1157 } } // namespace v8::internal 1161 } } // namespace v8::internal
1162
1163
1164 extern "C" {
1165 void ACQUIRE_DTOA_LOCK(int n) {
1166 ASSERT(n == 0 || n == 1);
1167 (n == 0 ? v8::internal::dtoa_lock_zero : v8::internal::dtoa_lock_one)->Lock();
1168 }
1169
1170
1171 void FREE_DTOA_LOCK(int n) {
1172 ASSERT(n == 0 || n == 1);
1173 (n == 0 ? v8::internal::dtoa_lock_zero : v8::internal::dtoa_lock_one)->
1174 Unlock();
1175 }
1176 }
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/dtoa-config.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698