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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 7600025: Create a common subclass for arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 4 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 | « src/arm/lithium-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 1372
1373 1373
1374 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { 1374 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) {
1375 Register result = ToRegister(instr->result()); 1375 Register result = ToRegister(instr->result());
1376 Register array = ToRegister(instr->InputAt(0)); 1376 Register array = ToRegister(instr->InputAt(0));
1377 __ ldr(result, FieldMemOperand(array, JSArray::kLengthOffset)); 1377 __ ldr(result, FieldMemOperand(array, JSArray::kLengthOffset));
1378 } 1378 }
1379 1379
1380 1380
1381 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { 1381 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) {
1382 Register result = ToRegister(instr->result()); 1382 Register result = ToRegister(instr->result());
1383 Register array = ToRegister(instr->InputAt(0)); 1383 Register array = ToRegister(instr->InputAt(0));
1384 __ ldr(result, FieldMemOperand(array, ExternalArray::kLengthOffset)); 1384 __ ldr(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset));
1385 } 1385 }
1386 1386
1387 1387
1388 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) {
1389 Register result = ToRegister(instr->result());
1390 Register array = ToRegister(instr->InputAt(0));
1391 __ ldr(result, FieldMemOperand(array, FixedArray::kLengthOffset));
1392 }
1393
1394
1395 void LCodeGen::DoElementsKind(LElementsKind* instr) { 1388 void LCodeGen::DoElementsKind(LElementsKind* instr) {
1396 Register result = ToRegister(instr->result()); 1389 Register result = ToRegister(instr->result());
1397 Register input = ToRegister(instr->InputAt(0)); 1390 Register input = ToRegister(instr->InputAt(0));
1398 1391
1399 // Load map into |result|. 1392 // Load map into |result|.
1400 __ ldr(result, FieldMemOperand(input, HeapObject::kMapOffset)); 1393 __ ldr(result, FieldMemOperand(input, HeapObject::kMapOffset));
1401 // Load the map's "bit field 2" into |result|. We only need the first byte, 1394 // Load the map's "bit field 2" into |result|. We only need the first byte,
1402 // but the following bit field extraction takes care of that anyway. 1395 // but the following bit field extraction takes care of that anyway.
1403 __ ldr(result, FieldMemOperand(result, Map::kBitField2Offset)); 1396 __ ldr(result, FieldMemOperand(result, Map::kBitField2Offset));
1404 // Retrieve elements_kind from bit field 2. 1397 // Retrieve elements_kind from bit field 2.
(...skipping 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after
4534 ASSERT(osr_pc_offset_ == -1); 4527 ASSERT(osr_pc_offset_ == -1);
4535 osr_pc_offset_ = masm()->pc_offset(); 4528 osr_pc_offset_ = masm()->pc_offset();
4536 } 4529 }
4537 4530
4538 4531
4539 4532
4540 4533
4541 #undef __ 4534 #undef __
4542 4535
4543 } } // namespace v8::internal 4536 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698