| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1431   // If the object is not a value type, return the object. | 1431   // If the object is not a value type, return the object. | 
| 1432   __ CompareObjectType(input, map, map, JS_VALUE_TYPE); | 1432   __ CompareObjectType(input, map, map, JS_VALUE_TYPE); | 
| 1433   __ Move(result, input, ne); | 1433   __ Move(result, input, ne); | 
| 1434   __ b(ne, &done); | 1434   __ b(ne, &done); | 
| 1435   __ ldr(result, FieldMemOperand(input, JSValue::kValueOffset)); | 1435   __ ldr(result, FieldMemOperand(input, JSValue::kValueOffset)); | 
| 1436 | 1436 | 
| 1437   __ bind(&done); | 1437   __ bind(&done); | 
| 1438 } | 1438 } | 
| 1439 | 1439 | 
| 1440 | 1440 | 
|  | 1441 void LCodeGen::DoDateField(LDateField* instr) { | 
|  | 1442   Register object = ToRegister(instr->InputAt(0)); | 
|  | 1443   Register result = ToRegister(instr->result()); | 
|  | 1444   Register scratch = ToRegister(instr->TempAt(0)); | 
|  | 1445   Smi* index = instr->index(); | 
|  | 1446   Label runtime, done; | 
|  | 1447   ASSERT(object.is(result)); | 
|  | 1448   ASSERT(object.is(r0)); | 
|  | 1449   ASSERT(!scratch.is(scratch0())); | 
|  | 1450   ASSERT(!scratch.is(object)); | 
|  | 1451   if (index->value() == 0) { | 
|  | 1452     __ ldr(result, FieldMemOperand(object, JSDate::kValueOffset)); | 
|  | 1453   } else { | 
|  | 1454     if (index->value() < JSDate::kFirstUncachedField) { | 
|  | 1455       ExternalReference stamp = ExternalReference::date_cache_stamp(isolate()); | 
|  | 1456       __ mov(scratch, Operand(stamp)); | 
|  | 1457       __ ldr(scratch, MemOperand(scratch)); | 
|  | 1458       __ ldr(scratch0(), FieldMemOperand(object, JSDate::kCacheStampOffset)); | 
|  | 1459       __ cmp(scratch, scratch0()); | 
|  | 1460       __ b(ne, &runtime); | 
|  | 1461       __ ldr(result, FieldMemOperand(object, JSDate::kValueOffset + | 
|  | 1462                                              kPointerSize * index->value())); | 
|  | 1463       __ jmp(&done); | 
|  | 1464     } | 
|  | 1465     __ bind(&runtime); | 
|  | 1466     __ PrepareCallCFunction(2, scratch); | 
|  | 1467     __ mov(r1, Operand(index)); | 
|  | 1468     __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); | 
|  | 1469     __ bind(&done); | 
|  | 1470   } | 
|  | 1471 } | 
|  | 1472 | 
|  | 1473 | 
| 1441 void LCodeGen::DoBitNotI(LBitNotI* instr) { | 1474 void LCodeGen::DoBitNotI(LBitNotI* instr) { | 
| 1442   Register input = ToRegister(instr->InputAt(0)); | 1475   Register input = ToRegister(instr->InputAt(0)); | 
| 1443   Register result = ToRegister(instr->result()); | 1476   Register result = ToRegister(instr->result()); | 
| 1444   __ mvn(result, Operand(input)); | 1477   __ mvn(result, Operand(input)); | 
| 1445 } | 1478 } | 
| 1446 | 1479 | 
| 1447 | 1480 | 
| 1448 void LCodeGen::DoThrow(LThrow* instr) { | 1481 void LCodeGen::DoThrow(LThrow* instr) { | 
| 1449   Register input_reg = EmitLoadRegister(instr->InputAt(0), ip); | 1482   Register input_reg = EmitLoadRegister(instr->InputAt(0), ip); | 
| 1450   __ push(input_reg); | 1483   __ push(input_reg); | 
| (...skipping 3525 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4976   __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5009   __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 
| 4977   __ ldr(result, FieldMemOperand(scratch, | 5010   __ ldr(result, FieldMemOperand(scratch, | 
| 4978                                  FixedArray::kHeaderSize - kPointerSize)); | 5011                                  FixedArray::kHeaderSize - kPointerSize)); | 
| 4979   __ bind(&done); | 5012   __ bind(&done); | 
| 4980 } | 5013 } | 
| 4981 | 5014 | 
| 4982 | 5015 | 
| 4983 #undef __ | 5016 #undef __ | 
| 4984 | 5017 | 
| 4985 } }  // namespace v8::internal | 5018 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|