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

Side by Side Diff: runtime/vm/object.cc

Issue 353403004: Fixes Android build by using C++ math header instead of C one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 15668 matching lines...) Expand 10 before | Expand all | Expand 10 after
15679 RawDouble* Double::NewCanonical(const String& str) { 15679 RawDouble* Double::NewCanonical(const String& str) {
15680 double double_value; 15680 double double_value;
15681 if (!CStringToDouble(str.ToCString(), str.Length(), &double_value)) { 15681 if (!CStringToDouble(str.ToCString(), str.Length(), &double_value)) {
15682 return Double::Handle().raw(); 15682 return Double::Handle().raw();
15683 } 15683 }
15684 return NewCanonical(double_value); 15684 return NewCanonical(double_value);
15685 } 15685 }
15686 15686
15687 15687
15688 const char* Double::ToCString() const { 15688 const char* Double::ToCString() const {
15689 if (isnan(value())) { 15689 if (std::isnan(value())) {
15690 return "NaN"; 15690 return "NaN";
15691 } 15691 }
15692 if (isinf(value())) { 15692 if (std::isinf(value())) {
15693 return value() < 0 ? "-Infinity" : "Infinity"; 15693 return value() < 0 ? "-Infinity" : "Infinity";
15694 } 15694 }
15695 const int kBufferSize = 128; 15695 const int kBufferSize = 128;
15696 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(kBufferSize); 15696 char* buffer = Isolate::Current()->current_zone()->Alloc<char>(kBufferSize);
15697 buffer[kBufferSize - 1] = '\0'; 15697 buffer[kBufferSize - 1] = '\0';
15698 DoubleToCString(value(), buffer, kBufferSize); 15698 DoubleToCString(value(), buffer, kBufferSize);
15699 return buffer; 15699 return buffer;
15700 } 15700 }
15701 15701
15702 15702
(...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after
18992 return tag_label.ToCString(); 18992 return tag_label.ToCString();
18993 } 18993 }
18994 18994
18995 18995
18996 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 18996 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
18997 Instance::PrintJSONImpl(stream, ref); 18997 Instance::PrintJSONImpl(stream, ref);
18998 } 18998 }
18999 18999
19000 19000
19001 } // namespace dart 19001 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698