| OLD | NEW |
| 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 10342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10353 | 10353 |
| 10354 | 10354 |
| 10355 RawInteger* Integer::New(int64_t value, Heap::Space space) { | 10355 RawInteger* Integer::New(int64_t value, Heap::Space space) { |
| 10356 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { | 10356 if ((value <= Smi::kMaxValue) && (value >= Smi::kMinValue)) { |
| 10357 return Smi::New(value); | 10357 return Smi::New(value); |
| 10358 } | 10358 } |
| 10359 return Mint::New(value, space); | 10359 return Mint::New(value, space); |
| 10360 } | 10360 } |
| 10361 | 10361 |
| 10362 | 10362 |
| 10363 RawInteger* Integer::NewFromUint64(uint64_t value, Heap::Space space) { |
| 10364 if (value > static_cast<uint64_t>(Mint::kMaxValue)) { |
| 10365 return BigintOperations::NewFromUint64(value); |
| 10366 } else { |
| 10367 return Integer::New(value); |
| 10368 } |
| 10369 } |
| 10370 |
| 10371 |
| 10363 double Integer::AsDoubleValue() const { | 10372 double Integer::AsDoubleValue() const { |
| 10364 UNIMPLEMENTED(); | 10373 UNIMPLEMENTED(); |
| 10365 return 0.0; | 10374 return 0.0; |
| 10366 } | 10375 } |
| 10367 | 10376 |
| 10368 | 10377 |
| 10369 int64_t Integer::AsInt64Value() const { | 10378 int64_t Integer::AsInt64Value() const { |
| 10370 UNIMPLEMENTED(); | 10379 UNIMPLEMENTED(); |
| 10371 return 0; | 10380 return 0; |
| 10372 } | 10381 } |
| (...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13241 } | 13250 } |
| 13242 return result.raw(); | 13251 return result.raw(); |
| 13243 } | 13252 } |
| 13244 | 13253 |
| 13245 | 13254 |
| 13246 const char* WeakProperty::ToCString() const { | 13255 const char* WeakProperty::ToCString() const { |
| 13247 return "_WeakProperty"; | 13256 return "_WeakProperty"; |
| 13248 } | 13257 } |
| 13249 | 13258 |
| 13250 } // namespace dart | 13259 } // namespace dart |
| OLD | NEW |