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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 XMMRegister temp, 407 XMMRegister temp,
408 MinusZeroMode minus_zero_mode, 408 MinusZeroMode minus_zero_mode,
409 Label* lost_precision) { 409 Label* lost_precision) {
410 Label done; 410 Label done;
411 ASSERT(!temp.is(xmm0)); 411 ASSERT(!temp.is(xmm0));
412 412
413 cmp(FieldOperand(input_reg, HeapObject::kMapOffset), 413 cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
414 isolate()->factory()->heap_number_map()); 414 isolate()->factory()->heap_number_map());
415 j(not_equal, lost_precision, Label::kNear); 415 j(not_equal, lost_precision, Label::kNear);
416 416
417 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 417 if (CpuFeatures::IsSafeForSnapshot(isolate(), SSE2)) {
418 ASSERT(!temp.is(no_xmm_reg)); 418 ASSERT(!temp.is(no_xmm_reg));
419 CpuFeatureScope scope(this, SSE2); 419 CpuFeatureScope scope(this, SSE2);
420 420
421 movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset)); 421 movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
422 cvttsd2si(result_reg, Operand(xmm0)); 422 cvttsd2si(result_reg, Operand(xmm0));
423 Cvtsi2sd(temp, Operand(result_reg)); 423 Cvtsi2sd(temp, Operand(result_reg));
424 ucomisd(xmm0, temp); 424 ucomisd(xmm0, temp);
425 RecordComment("Deferred TaggedToI: lost precision"); 425 RecordComment("Deferred TaggedToI: lost precision");
426 j(not_equal, lost_precision, Label::kNear); 426 j(not_equal, lost_precision, Label::kNear);
427 RecordComment("Deferred TaggedToI: NaN"); 427 RecordComment("Deferred TaggedToI: NaN");
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 } 1417 }
1418 1418
1419 1419
1420 // Compute the hash code from the untagged key. This must be kept in sync with 1420 // Compute the hash code from the untagged key. This must be kept in sync with
1421 // ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in 1421 // ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
1422 // code-stub-hydrogen.cc 1422 // code-stub-hydrogen.cc
1423 // 1423 //
1424 // Note: r0 will contain hash code 1424 // Note: r0 will contain hash code
1425 void MacroAssembler::GetNumberHash(Register r0, Register scratch) { 1425 void MacroAssembler::GetNumberHash(Register r0, Register scratch) {
1426 // Xor original key with a seed. 1426 // Xor original key with a seed.
1427 if (Serializer::enabled()) { 1427 if (Serializer::enabled(isolate())) {
1428 ExternalReference roots_array_start = 1428 ExternalReference roots_array_start =
1429 ExternalReference::roots_array_start(isolate()); 1429 ExternalReference::roots_array_start(isolate());
1430 mov(scratch, Immediate(Heap::kHashSeedRootIndex)); 1430 mov(scratch, Immediate(Heap::kHashSeedRootIndex));
1431 mov(scratch, 1431 mov(scratch,
1432 Operand::StaticArray(scratch, times_pointer_size, roots_array_start)); 1432 Operand::StaticArray(scratch, times_pointer_size, roots_array_start));
1433 SmiUntag(scratch); 1433 SmiUntag(scratch);
1434 xor_(r0, scratch); 1434 xor_(r0, scratch);
1435 } else { 1435 } else {
1436 int32_t seed = isolate()->heap()->HashSeed(); 1436 int32_t seed = isolate()->heap()->HashSeed();
1437 xor_(r0, Immediate(seed)); 1437 xor_(r0, Immediate(seed));
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 if (ms.shift() > 0) sar(edx, ms.shift()); 3646 if (ms.shift() > 0) sar(edx, ms.shift());
3647 mov(eax, dividend); 3647 mov(eax, dividend);
3648 shr(eax, 31); 3648 shr(eax, 31);
3649 add(edx, eax); 3649 add(edx, eax);
3650 } 3650 }
3651 3651
3652 3652
3653 } } // namespace v8::internal 3653 } } // namespace v8::internal
3654 3654
3655 #endif // V8_TARGET_ARCH_IA32 3655 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698