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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 9958046: Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add view classes and their tests Created 8 years, 8 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
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index faacdf8b89bfb05e02945a50cf1616eba1d47ee4..030257493a44f3c9d11b1a441bb73514fd76fdb2 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -24,7 +24,6 @@ namespace dart {
DECLARE_FLAG(bool, enable_type_checks);
-
#define __ assembler->
bool Intrinsifier::ObjectArray_Allocate(Assembler* assembler) {
@@ -421,50 +420,6 @@ bool Intrinsifier::GrowableArray_setData(Assembler* assembler) {
}
-// Handles only class InternalByteArray.
-bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) {
- ObjectStore* object_store = Isolate::Current()->object_store();
- Label fall_through;
- __ movl(EAX, Address(ESP, + 1 * kWordSize));
- __ movl(EBX, FieldAddress(EAX, Object::class_offset()));
- __ CompareObject(EBX,
- Class::ZoneHandle(object_store->internal_byte_array_class()));
- __ j(NOT_EQUAL, &fall_through);
- __ movl(EAX, FieldAddress(EAX, InternalByteArray::length_offset()));
- __ ret();
- __ Bind(&fall_through);
- return false;
-}
-
-
-// Handles only class InternalByteArray.
-bool Intrinsifier::ByteArrayBase_getIndexed(Assembler* assembler) {
- ObjectStore* object_store = Isolate::Current()->object_store();
- Label fall_through;
- __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Array.
- __ movl(EBX, FieldAddress(EAX, Object::class_offset()));
- __ CompareObject(EBX,
- Class::ZoneHandle(object_store->internal_byte_array_class()));
- __ j(NOT_EQUAL, &fall_through);
- __ movl(EBX, Address(ESP, + 1 * kWordSize)); // Index.
- __ testl(EBX, Immediate(kSmiTagMask));
- __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi index.
- // Range check.
- __ cmpl(EBX, FieldAddress(EAX, InternalByteArray::length_offset()));
- // Runtime throws exception.
- __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
- __ SmiUntag(EBX);
- __ movzxb(EAX,
- FieldAddress(EAX, EBX, TIMES_1, InternalByteArray::data_offset()));
- // The values stored in the byte array are regular, untagged values,
- // therefore they need to be tagged.
- __ SmiTag(EAX);
- __ ret();
- __ Bind(&fall_through);
- return false;
-}
-
-
// Tests if two top most arguments are smis, jumps to label not_smi if not.
// Topmost argument is in EAX.
static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) {

Powered by Google App Engine
This is Rietveld 408576698