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

Side by Side Diff: vm/bigint_store.h

Issue 9481019: Changes to get rid of dependency on openssl in the dart VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/bigint_operations_test.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_BIGINT_STORE_H_
6 #define VM_BIGINT_STORE_H_
7
8 #include "vm/globals.h"
9 #include "vm/isolate.h"
10
11 namespace dart {
12
13 // Use to store teporary BIGNUMs.
14 class BigintStore {
15 public:
16 BigintStore() : bn_(NULL), bn_ctx_(NULL) {}
17 ~BigintStore() {
18 BN_free(bn_);
19 BN_CTX_free(bn_ctx_);
20 }
21
22 static BigintStore* Get() {
23 BigintStore* store = Isolate::Current()->bigint_store();
24 if (store == NULL) {
25 store = new BigintStore();
26 Isolate::Current()->set_bigint_store(store);
27 }
28 return store;
29 }
30
31 BIGNUM* bn_;
32 BN_CTX* bn_ctx_;
33 };
34
35 } // namespace dart
36
37 #endif // VM_BIGINT_STORE_H_
OLDNEW
« no previous file with comments | « vm/bigint_operations_test.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698