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

Side by Side Diff: src/mips/lithium-codegen-mips.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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 Handle<DeoptimizationInputData> data = 920 Handle<DeoptimizationInputData> data =
921 factory()->NewDeoptimizationInputData(length, TENURED); 921 factory()->NewDeoptimizationInputData(length, TENURED);
922 922
923 Handle<ByteArray> translations = 923 Handle<ByteArray> translations =
924 translations_.CreateByteArray(isolate()->factory()); 924 translations_.CreateByteArray(isolate()->factory());
925 data->SetTranslationByteArray(*translations); 925 data->SetTranslationByteArray(*translations);
926 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 926 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
927 927
928 Handle<FixedArray> literals = 928 Handle<FixedArray> literals =
929 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 929 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
930 { ALLOW_HANDLE_DEREF(isolate(), 930 { ALLOW_DEFERRED_HANDLE_DEREF(
931 "copying a ZoneList of handles into a FixedArray"); 931 isolate(), "copying a ZoneList of handles into a FixedArray");
932 for (int i = 0; i < deoptimization_literals_.length(); i++) { 932 for (int i = 0; i < deoptimization_literals_.length(); i++) {
933 literals->set(i, *deoptimization_literals_[i]); 933 literals->set(i, *deoptimization_literals_[i]);
934 } 934 }
935 data->SetLiteralArray(*literals); 935 data->SetLiteralArray(*literals);
936 } 936 }
937 937
938 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); 938 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt()));
939 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); 939 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_));
940 940
941 // Populate the deoptimization entries. 941 // Populate the deoptimization entries.
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 void LCodeGen::DoConstantD(LConstantD* instr) { 1512 void LCodeGen::DoConstantD(LConstantD* instr) {
1513 ASSERT(instr->result()->IsDoubleRegister()); 1513 ASSERT(instr->result()->IsDoubleRegister());
1514 DoubleRegister result = ToDoubleRegister(instr->result()); 1514 DoubleRegister result = ToDoubleRegister(instr->result());
1515 double v = instr->value(); 1515 double v = instr->value();
1516 __ Move(result, v); 1516 __ Move(result, v);
1517 } 1517 }
1518 1518
1519 1519
1520 void LCodeGen::DoConstantT(LConstantT* instr) { 1520 void LCodeGen::DoConstantT(LConstantT* instr) {
1521 Handle<Object> value = instr->value(); 1521 Handle<Object> value = instr->value();
1522 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 1522 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check");
1523 if (value->IsSmi()) { 1523 if (value->IsSmi()) {
1524 __ li(ToRegister(instr->result()), Operand(value)); 1524 __ li(ToRegister(instr->result()), Operand(value));
1525 } else { 1525 } else {
1526 __ LoadHeapObject(ToRegister(instr->result()), 1526 __ LoadHeapObject(ToRegister(instr->result()),
1527 Handle<HeapObject>::cast(value)); 1527 Handle<HeapObject>::cast(value));
1528 } 1528 }
1529 } 1529 }
1530 1530
1531 1531
1532 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { 1532 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) {
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after
5015 __ And(scratch, scratch, Operand(mask)); 5015 __ And(scratch, scratch, Operand(mask));
5016 DeoptimizeIf(ne, instr->environment(), scratch, Operand(tag)); 5016 DeoptimizeIf(ne, instr->environment(), scratch, Operand(tag));
5017 } 5017 }
5018 } 5018 }
5019 } 5019 }
5020 5020
5021 5021
5022 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5022 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
5023 Register reg = ToRegister(instr->value()); 5023 Register reg = ToRegister(instr->value());
5024 Handle<JSFunction> target = instr->hydrogen()->target(); 5024 Handle<JSFunction> target = instr->hydrogen()->target();
5025 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 5025 ALLOW_DEFERRED_HANDLE_DEREF(isolate(), "smi check");
5026 if (isolate()->heap()->InNewSpace(*target)) { 5026 if (isolate()->heap()->InNewSpace(*target)) {
5027 Register reg = ToRegister(instr->value()); 5027 Register reg = ToRegister(instr->value());
5028 Handle<JSGlobalPropertyCell> cell = 5028 Handle<JSGlobalPropertyCell> cell =
5029 isolate()->factory()->NewJSGlobalPropertyCell(target); 5029 isolate()->factory()->NewJSGlobalPropertyCell(target);
5030 __ li(at, Operand(Handle<Object>(cell))); 5030 __ li(at, Operand(Handle<Object>(cell)));
5031 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); 5031 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset));
5032 DeoptimizeIf(ne, instr->environment(), reg, 5032 DeoptimizeIf(ne, instr->environment(), reg,
5033 Operand(at)); 5033 Operand(at));
5034 } else { 5034 } else {
5035 DeoptimizeIf(ne, instr->environment(), reg, 5035 DeoptimizeIf(ne, instr->environment(), reg,
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
5768 __ Subu(scratch, result, scratch); 5768 __ Subu(scratch, result, scratch);
5769 __ lw(result, FieldMemOperand(scratch, 5769 __ lw(result, FieldMemOperand(scratch,
5770 FixedArray::kHeaderSize - kPointerSize)); 5770 FixedArray::kHeaderSize - kPointerSize));
5771 __ bind(&done); 5771 __ bind(&done);
5772 } 5772 }
5773 5773
5774 5774
5775 #undef __ 5775 #undef __
5776 5776
5777 } } // namespace v8::internal 5777 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698