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

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

Issue 15691017: Make assertion scopes thread safe. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 Handle<DeoptimizationInputData> data = 830 Handle<DeoptimizationInputData> data =
831 factory()->NewDeoptimizationInputData(length, TENURED); 831 factory()->NewDeoptimizationInputData(length, TENURED);
832 832
833 Handle<ByteArray> translations = 833 Handle<ByteArray> translations =
834 translations_.CreateByteArray(isolate()->factory()); 834 translations_.CreateByteArray(isolate()->factory());
835 data->SetTranslationByteArray(*translations); 835 data->SetTranslationByteArray(*translations);
836 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 836 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
837 837
838 Handle<FixedArray> literals = 838 Handle<FixedArray> literals =
839 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 839 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
840 { ALLOW_HANDLE_DEREF(isolate(), 840 { AllowDeferredHandleDereference copy_handles;
841 "copying a ZoneList of handles into a FixedArray");
842 for (int i = 0; i < deoptimization_literals_.length(); i++) { 841 for (int i = 0; i < deoptimization_literals_.length(); i++) {
843 literals->set(i, *deoptimization_literals_[i]); 842 literals->set(i, *deoptimization_literals_[i]);
844 } 843 }
845 data->SetLiteralArray(*literals); 844 data->SetLiteralArray(*literals);
846 } 845 }
847 846
848 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); 847 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt()));
849 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); 848 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_));
850 849
851 // Populate the deoptimization entries. 850 // Populate the deoptimization entries.
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 } else { 1580 } else {
1582 Register tmp = ToRegister(instr->temp()); 1581 Register tmp = ToRegister(instr->temp());
1583 __ Set(tmp, int_val); 1582 __ Set(tmp, int_val);
1584 __ movq(res, tmp); 1583 __ movq(res, tmp);
1585 } 1584 }
1586 } 1585 }
1587 1586
1588 1587
1589 void LCodeGen::DoConstantT(LConstantT* instr) { 1588 void LCodeGen::DoConstantT(LConstantT* instr) {
1590 Handle<Object> value = instr->value(); 1589 Handle<Object> value = instr->value();
1591 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 1590 AllowDeferredHandleDereference smi_check;
1592 if (value->IsSmi()) { 1591 if (value->IsSmi()) {
1593 __ Move(ToRegister(instr->result()), value); 1592 __ Move(ToRegister(instr->result()), value);
1594 } else { 1593 } else {
1595 __ LoadHeapObject(ToRegister(instr->result()), 1594 __ LoadHeapObject(ToRegister(instr->result()),
1596 Handle<HeapObject>::cast(value)); 1595 Handle<HeapObject>::cast(value));
1597 } 1596 }
1598 } 1597 }
1599 1598
1600 1599
1601 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { 1600 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) {
(...skipping 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after
5329 LOperand* input = instr->value(); 5328 LOperand* input = instr->value();
5330 EmitPushTaggedOperand(input); 5329 EmitPushTaggedOperand(input);
5331 CallRuntime(Runtime::kTypeof, 1, instr); 5330 CallRuntime(Runtime::kTypeof, 1, instr);
5332 } 5331 }
5333 5332
5334 5333
5335 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { 5334 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) {
5336 ASSERT(!operand->IsDoubleRegister()); 5335 ASSERT(!operand->IsDoubleRegister());
5337 if (operand->IsConstantOperand()) { 5336 if (operand->IsConstantOperand()) {
5338 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); 5337 Handle<Object> object = ToHandle(LConstantOperand::cast(operand));
5339 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 5338 AllowDeferredHandleDereference smi_check;
5340 if (object->IsSmi()) { 5339 if (object->IsSmi()) {
5341 __ Push(Handle<Smi>::cast(object)); 5340 __ Push(Handle<Smi>::cast(object));
5342 } else { 5341 } else {
5343 __ PushHeapObject(Handle<HeapObject>::cast(object)); 5342 __ PushHeapObject(Handle<HeapObject>::cast(object));
5344 } 5343 }
5345 } else if (operand->IsRegister()) { 5344 } else if (operand->IsRegister()) {
5346 __ push(ToRegister(operand)); 5345 __ push(ToRegister(operand));
5347 } else { 5346 } else {
5348 __ push(ToOperand(operand)); 5347 __ push(ToOperand(operand));
5349 } 5348 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
5698 FixedArray::kHeaderSize - kPointerSize)); 5697 FixedArray::kHeaderSize - kPointerSize));
5699 __ bind(&done); 5698 __ bind(&done);
5700 } 5699 }
5701 5700
5702 5701
5703 #undef __ 5702 #undef __
5704 5703
5705 } } // namespace v8::internal 5704 } } // namespace v8::internal
5706 5705
5707 #endif // V8_TARGET_ARCH_X64 5706 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/api.cc ('K') | « src/x64/deoptimizer-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698