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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 Handle<DeoptimizationInputData> data = 1024 Handle<DeoptimizationInputData> data =
1025 factory()->NewDeoptimizationInputData(length, TENURED); 1025 factory()->NewDeoptimizationInputData(length, TENURED);
1026 1026
1027 Handle<ByteArray> translations = 1027 Handle<ByteArray> translations =
1028 translations_.CreateByteArray(isolate()->factory()); 1028 translations_.CreateByteArray(isolate()->factory());
1029 data->SetTranslationByteArray(*translations); 1029 data->SetTranslationByteArray(*translations);
1030 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 1030 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
1031 1031
1032 Handle<FixedArray> literals = 1032 Handle<FixedArray> literals =
1033 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 1033 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
1034 { ALLOW_HANDLE_DEREF(isolate(), 1034 { ALLOW_DEFERRED_HANDLE_DEREF(
1035 "copying a ZoneList of handles into a FixedArray"); 1035 isolate(), "copying a ZoneList of handles into a FixedArray");
1036 for (int i = 0; i < deoptimization_literals_.length(); i++) { 1036 for (int i = 0; i < deoptimization_literals_.length(); i++) {
1037 literals->set(i, *deoptimization_literals_[i]); 1037 literals->set(i, *deoptimization_literals_[i]);
1038 } 1038 }
1039 data->SetLiteralArray(*literals); 1039 data->SetLiteralArray(*literals);
1040 } 1040 }
1041 1041
1042 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); 1042 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt()));
1043 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); 1043 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_));
1044 1044
1045 // Populate the deoptimization entries. 1045 // Populate the deoptimization entries.
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } 1803 }
1804 } 1804 }
1805 } 1805 }
1806 } 1806 }
1807 } 1807 }
1808 1808
1809 1809
1810 void LCodeGen::DoConstantT(LConstantT* instr) { 1810 void LCodeGen::DoConstantT(LConstantT* instr) {
1811 Register reg = ToRegister(instr->result()); 1811 Register reg = ToRegister(instr->result());
1812 Handle<Object> handle = instr->value(); 1812 Handle<Object> handle = instr->value();
1813 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 1813 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check");
1814 if (handle->IsHeapObject()) { 1814 if (handle->IsHeapObject()) {
1815 __ LoadHeapObject(reg, Handle<HeapObject>::cast(handle)); 1815 __ LoadHeapObject(reg, Handle<HeapObject>::cast(handle));
1816 } else { 1816 } else {
1817 __ Set(reg, Immediate(handle)); 1817 __ Set(reg, Immediate(handle));
1818 } 1818 }
1819 } 1819 }
1820 1820
1821 1821
1822 void LCodeGen::DoFixedArrayBaseLength( 1822 void LCodeGen::DoFixedArrayBaseLength(
1823 LFixedArrayBaseLength* instr) { 1823 LFixedArrayBaseLength* instr) {
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 } 3056 }
3057 __ mov(result, factory()->undefined_value()); 3057 __ mov(result, factory()->undefined_value());
3058 } 3058 }
3059 } 3059 }
3060 3060
3061 3061
3062 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { 3062 void LCodeGen::EmitPushTaggedOperand(LOperand* operand) {
3063 ASSERT(!operand->IsDoubleRegister()); 3063 ASSERT(!operand->IsDoubleRegister());
3064 if (operand->IsConstantOperand()) { 3064 if (operand->IsConstantOperand()) {
3065 Handle<Object> object = ToHandle(LConstantOperand::cast(operand)); 3065 Handle<Object> object = ToHandle(LConstantOperand::cast(operand));
3066 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 3066 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check");
3067 if (object->IsSmi()) { 3067 if (object->IsSmi()) {
3068 __ Push(Handle<Smi>::cast(object)); 3068 __ Push(Handle<Smi>::cast(object));
3069 } else { 3069 } else {
3070 __ PushHeapObject(Handle<HeapObject>::cast(object)); 3070 __ PushHeapObject(Handle<HeapObject>::cast(object));
3071 } 3071 }
3072 } else if (operand->IsRegister()) { 3072 } else if (operand->IsRegister()) {
3073 __ push(ToRegister(operand)); 3073 __ push(ToRegister(operand));
3074 } else { 3074 } else {
3075 __ push(ToOperand(operand)); 3075 __ push(ToOperand(operand));
3076 } 3076 }
(...skipping 3524 matching lines...) Expand 10 before | Expand all | Expand 10 after
6601 FixedArray::kHeaderSize - kPointerSize)); 6601 FixedArray::kHeaderSize - kPointerSize));
6602 __ bind(&done); 6602 __ bind(&done);
6603 } 6603 }
6604 6604
6605 6605
6606 #undef __ 6606 #undef __
6607 6607
6608 } } // namespace v8::internal 6608 } } // namespace v8::internal
6609 6609
6610 #endif // V8_TARGET_ARCH_IA32 6610 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698