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

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

Issue 509153003: New bigint implementation in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/bigint_operations.h"
10 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
11 #include "vm/compiler.h" 10 #include "vm/compiler.h"
12 #include "vm/dart_api_impl.h" 11 #include "vm/dart_api_impl.h"
13 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
14 #include "vm/debugger.h" 13 #include "vm/debugger.h"
15 #include "vm/deopt_instructions.h" 14 #include "vm/deopt_instructions.h"
16 #include "vm/exceptions.h" 15 #include "vm/exceptions.h"
17 #include "vm/intermediate_language.h" 16 #include "vm/intermediate_language.h"
18 #include "vm/object_store.h" 17 #include "vm/object_store.h"
19 #include "vm/message.h" 18 #include "vm/message.h"
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 DEFINE_LEAF_RUNTIME_ENTRY(intptr_t, 1529 DEFINE_LEAF_RUNTIME_ENTRY(intptr_t,
1531 BigintCompare, 1530 BigintCompare,
1532 2, 1531 2,
1533 RawBigint* left, 1532 RawBigint* left,
1534 RawBigint* right) { 1533 RawBigint* right) {
1535 Isolate* isolate = Isolate::Current(); 1534 Isolate* isolate = Isolate::Current();
1536 StackZone zone(isolate); 1535 StackZone zone(isolate);
1537 HANDLESCOPE(isolate); 1536 HANDLESCOPE(isolate);
1538 const Bigint& big_left = Bigint::Handle(left); 1537 const Bigint& big_left = Bigint::Handle(left);
1539 const Bigint& big_right = Bigint::Handle(right); 1538 const Bigint& big_right = Bigint::Handle(right);
1540 return BigintOperations::Compare(big_left, big_right); 1539 return big_left.CompareWith(big_right);
1541 } 1540 }
1542 END_LEAF_RUNTIME_ENTRY 1541 END_LEAF_RUNTIME_ENTRY
1543 1542
1544 1543
1545 double DartModulo(double left, double right) { 1544 double DartModulo(double left, double right) {
1546 double remainder = fmod_ieee(left, right); 1545 double remainder = fmod_ieee(left, right);
1547 if (remainder == 0.0) { 1546 if (remainder == 0.0) {
1548 // We explicitely switch to the positive 0.0 (just in case it was negative). 1547 // We explicitely switch to the positive 0.0 (just in case it was negative).
1549 remainder = +0.0; 1548 remainder = +0.0;
1550 } else if (remainder < 0.0) { 1549 } else if (remainder < 0.0) {
(...skipping 25 matching lines...) Expand all
1576 field.RecordStore(value); 1575 field.RecordStore(value);
1577 } 1576 }
1578 1577
1579 1578
1580 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1579 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1581 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1580 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1582 field.EvaluateInitializer(); 1581 field.EvaluateInitializer();
1583 } 1582 }
1584 1583
1585 } // namespace dart 1584 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698