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

Side by Side Diff: src/objects.cc

Issue 1940: Replaced calls to functions that msvc consider deprecated. Used... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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/log.cc ('k') | src/platform.h » ('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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 886 }
887 887
888 888
889 void HeapNumber::HeapNumberPrint(StringStream* accumulator) { 889 void HeapNumber::HeapNumberPrint(StringStream* accumulator) {
890 // The Windows version of vsnprintf can allocate when printing a %g string 890 // The Windows version of vsnprintf can allocate when printing a %g string
891 // into a buffer that may not be big enough. We don't want random memory 891 // into a buffer that may not be big enough. We don't want random memory
892 // allocation when producing post-crash stack traces, so we print into a 892 // allocation when producing post-crash stack traces, so we print into a
893 // buffer that is plenty big enough for any floating point number, then 893 // buffer that is plenty big enough for any floating point number, then
894 // print that using vsnprintf (which may truncate but never allocate if 894 // print that using vsnprintf (which may truncate but never allocate if
895 // there is no more space in the buffer). 895 // there is no more space in the buffer).
896 char buffer[100]; 896 EmbeddedVector<char, 100> buffer;
897 OS::SNPrintF(buffer, sizeof(buffer), "%.16g", Number()); 897 OS::SNPrintF(buffer, "%.16g", Number());
898 accumulator->Add("%s", buffer); 898 accumulator->Add("%s", buffer.start());
899 } 899 }
900 900
901 901
902 String* JSObject::class_name() { 902 String* JSObject::class_name() {
903 if (IsJSFunction()) return Heap::function_class_symbol(); 903 if (IsJSFunction()) return Heap::function_class_symbol();
904 // If the constructor is not present "Object" is returned. 904 // If the constructor is not present "Object" is returned.
905 String* result = Heap::Object_symbol(); 905 String* result = Heap::Object_symbol();
906 if (map()->constructor()->IsJSFunction()) { 906 if (map()->constructor()->IsJSFunction()) {
907 JSFunction* constructor = JSFunction::cast(map()->constructor()); 907 JSFunction* constructor = JSFunction::cast(map()->constructor());
908 return String::cast(constructor->shared()->instance_class_name()); 908 return String::cast(constructor->shared()->instance_class_name());
(...skipping 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after
6261 // No break point. 6261 // No break point.
6262 if (break_point_objects()->IsUndefined()) return 0; 6262 if (break_point_objects()->IsUndefined()) return 0;
6263 // Single beak point. 6263 // Single beak point.
6264 if (!break_point_objects()->IsFixedArray()) return 1; 6264 if (!break_point_objects()->IsFixedArray()) return 1;
6265 // Multiple break points. 6265 // Multiple break points.
6266 return FixedArray::cast(break_point_objects())->length(); 6266 return FixedArray::cast(break_point_objects())->length();
6267 } 6267 }
6268 6268
6269 6269
6270 } } // namespace v8::internal 6270 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698