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

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

Issue 9117034: New class for Date objects: caches individual date components. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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 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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 1272
1273 // If the object is not a value type, return the object. 1273 // If the object is not a value type, return the object.
1274 __ CmpObjectType(input, JS_VALUE_TYPE, map); 1274 __ CmpObjectType(input, JS_VALUE_TYPE, map);
1275 __ j(not_equal, &done, Label::kNear); 1275 __ j(not_equal, &done, Label::kNear);
1276 __ mov(result, FieldOperand(input, JSValue::kValueOffset)); 1276 __ mov(result, FieldOperand(input, JSValue::kValueOffset));
1277 1277
1278 __ bind(&done); 1278 __ bind(&done);
1279 } 1279 }
1280 1280
1281 1281
1282 void LCodeGen::DoDateField(LDateField* instr) {
1283 Register input = ToRegister(instr->InputAt(0));
1284 Register result = ToRegister(instr->result());
1285 Register map = ToRegister(instr->TempAt(0));
1286 ASSERT(input.is(result));
1287 Label done;
1288 // If the object is a smi return the object.
1289 __ JumpIfSmi(input, &done, Label::kNear);
ulan 2012/01/25 13:08:48 See comments in full-codegen-ia32.cc
rossberg 2012/01/25 15:48:37 Done.
1290
1291 // If the object is not a value type, return the object.
1292 __ CmpObjectType(input, JS_DATE_TYPE, map);
1293 __ j(not_equal, &done, Label::kNear);
1294 __ mov(result,
1295 FieldOperand(input, JSDate::kYearOffset + kPointerSize * instr->index()));
1296
1297 __ bind(&done);
1298 }
1299
1300
1282 void LCodeGen::DoBitNotI(LBitNotI* instr) { 1301 void LCodeGen::DoBitNotI(LBitNotI* instr) {
1283 LOperand* input = instr->InputAt(0); 1302 LOperand* input = instr->InputAt(0);
1284 ASSERT(input->Equals(instr->result())); 1303 ASSERT(input->Equals(instr->result()));
1285 __ not_(ToRegister(input)); 1304 __ not_(ToRegister(input));
1286 } 1305 }
1287 1306
1288 1307
1289 void LCodeGen::DoThrow(LThrow* instr) { 1308 void LCodeGen::DoThrow(LThrow* instr) {
1290 __ push(ToOperand(instr->value())); 1309 __ push(ToOperand(instr->value()));
1291 ASSERT(ToRegister(instr->context()).is(esi)); 1310 ASSERT(ToRegister(instr->context()).is(esi));
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after
4681 this, pointers, Safepoint::kLazyDeopt); 4700 this, pointers, Safepoint::kLazyDeopt);
4682 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4701 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4683 } 4702 }
4684 4703
4685 4704
4686 #undef __ 4705 #undef __
4687 4706
4688 } } // namespace v8::internal 4707 } } // namespace v8::internal
4689 4708
4690 #endif // V8_TARGET_ARCH_IA32 4709 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698