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

Unified Diff: runtime/vm/object.cc

Issue 1007863003: Allow Observatory debugger to switch isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 103a394b3da667849d0fa4316f75c63fa104a1f7..d739ff29d871de3cc53e98bd35b5aea912959d97 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15946,18 +15946,11 @@ RawInteger* Integer::NewCanonical(const String& str) {
}
-// dart2js represents integers as double precision floats, which can represent
-// anything in the range -2^53 ... 2^53.
-static bool IsJavascriptInt(int64_t value) {
- return ((-0x20000000000000LL <= value) && (value <= 0x20000000000000LL));
-}
-
-
RawInteger* Integer::New(int64_t value, Heap::Space space, const bool silent) {
const bool is_smi = Smi::IsValid(value);
if (!silent &&
FLAG_throw_on_javascript_int_overflow &&
- !IsJavascriptInt(value)) {
+ !Utils::IsJavascriptInt(value)) {
const Integer& i = is_smi ?
Integer::Handle(Smi::New(static_cast<intptr_t>(value))) :
Integer::Handle(Mint::New(value, space));
@@ -16055,7 +16048,7 @@ bool Integer::CheckJavascriptIntegerOverflow() const {
value = AsInt64Value();
}
}
- return !IsJavascriptInt(value);
+ return !Utils::IsJavascriptInt(value);
}
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698