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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2985423002: [vm] Revise Dart_IntegerToHexCString to avoid dependency on Bigint, v.2 (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/inttypes_support_win.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 8d440bcf0364edddb1fd2cc3a917eed460d94eb1..ea47c97744ba30ba1cd2fe184bc1970070ee1c31 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -2189,13 +2189,7 @@ DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
RETURN_TYPE_ERROR(Z, integer, Integer);
}
Zone* scope_zone = Api::TopScope(Thread::Current())->zone();
- if (int_obj.IsSmi() || int_obj.IsMint()) {
- const Bigint& bigint =
- Bigint::Handle(Z, Bigint::NewFromInt64(int_obj.AsInt64Value()));
- *value = bigint.ToHexCString(scope_zone);
- } else {
- *value = Bigint::Cast(int_obj).ToHexCString(scope_zone);
- }
+ *value = int_obj.ToHexCString(scope_zone);
return Api::Success();
}
« no previous file with comments | « runtime/platform/inttypes_support_win.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698