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

Side by Side Diff: src/arm/lithium-codegen-arm.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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 Handle<DeoptimizationInputData> data = 940 Handle<DeoptimizationInputData> data =
941 factory()->NewDeoptimizationInputData(length, TENURED); 941 factory()->NewDeoptimizationInputData(length, TENURED);
942 942
943 Handle<ByteArray> translations = 943 Handle<ByteArray> translations =
944 translations_.CreateByteArray(isolate()->factory()); 944 translations_.CreateByteArray(isolate()->factory());
945 data->SetTranslationByteArray(*translations); 945 data->SetTranslationByteArray(*translations);
946 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 946 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
947 947
948 Handle<FixedArray> literals = 948 Handle<FixedArray> literals =
949 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 949 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
950 { ALLOW_HANDLE_DEREF(isolate(), 950 { AllowDeferredHandleDereference copy_handles;
951 "copying a ZoneList of handles into a FixedArray");
952 for (int i = 0; i < deoptimization_literals_.length(); i++) { 951 for (int i = 0; i < deoptimization_literals_.length(); i++) {
953 literals->set(i, *deoptimization_literals_[i]); 952 literals->set(i, *deoptimization_literals_[i]);
954 } 953 }
955 data->SetLiteralArray(*literals); 954 data->SetLiteralArray(*literals);
956 } 955 }
957 956
958 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt())); 957 data->SetOsrAstId(Smi::FromInt(info_->osr_ast_id().ToInt()));
959 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_)); 958 data->SetOsrPcOffset(Smi::FromInt(osr_pc_offset_));
960 959
961 // Populate the deoptimization entries. 960 // Populate the deoptimization entries.
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 void LCodeGen::DoConstantD(LConstantD* instr) { 1912 void LCodeGen::DoConstantD(LConstantD* instr) {
1914 ASSERT(instr->result()->IsDoubleRegister()); 1913 ASSERT(instr->result()->IsDoubleRegister());
1915 DwVfpRegister result = ToDoubleRegister(instr->result()); 1914 DwVfpRegister result = ToDoubleRegister(instr->result());
1916 double v = instr->value(); 1915 double v = instr->value();
1917 __ Vmov(result, v, scratch0()); 1916 __ Vmov(result, v, scratch0());
1918 } 1917 }
1919 1918
1920 1919
1921 void LCodeGen::DoConstantT(LConstantT* instr) { 1920 void LCodeGen::DoConstantT(LConstantT* instr) {
1922 Handle<Object> value = instr->value(); 1921 Handle<Object> value = instr->value();
1923 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 1922 AllowDeferredHandleDereference smi_check;
1924 if (value->IsSmi()) { 1923 if (value->IsSmi()) {
1925 __ mov(ToRegister(instr->result()), Operand(value)); 1924 __ mov(ToRegister(instr->result()), Operand(value));
1926 } else { 1925 } else {
1927 __ LoadHeapObject(ToRegister(instr->result()), 1926 __ LoadHeapObject(ToRegister(instr->result()),
1928 Handle<HeapObject>::cast(value)); 1927 Handle<HeapObject>::cast(value));
1929 } 1928 }
1930 } 1929 }
1931 1930
1932 1931
1933 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { 1932 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) {
(...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 __ cmp(scratch, Operand(tag)); 5283 __ cmp(scratch, Operand(tag));
5285 DeoptimizeIf(ne, instr->environment()); 5284 DeoptimizeIf(ne, instr->environment());
5286 } 5285 }
5287 } 5286 }
5288 } 5287 }
5289 5288
5290 5289
5291 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5290 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
5292 Register reg = ToRegister(instr->value()); 5291 Register reg = ToRegister(instr->value());
5293 Handle<JSFunction> target = instr->hydrogen()->target(); 5292 Handle<JSFunction> target = instr->hydrogen()->target();
5294 ALLOW_HANDLE_DEREF(isolate(), "smi check"); 5293 AllowDeferredHandleDereference smi_check;
5295 if (isolate()->heap()->InNewSpace(*target)) { 5294 if (isolate()->heap()->InNewSpace(*target)) {
5296 Register reg = ToRegister(instr->value()); 5295 Register reg = ToRegister(instr->value());
5297 Handle<JSGlobalPropertyCell> cell = 5296 Handle<JSGlobalPropertyCell> cell =
5298 isolate()->factory()->NewJSGlobalPropertyCell(target); 5297 isolate()->factory()->NewJSGlobalPropertyCell(target);
5299 __ mov(ip, Operand(Handle<Object>(cell))); 5298 __ mov(ip, Operand(Handle<Object>(cell)));
5300 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); 5299 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
5301 __ cmp(reg, ip); 5300 __ cmp(reg, ip);
5302 } else { 5301 } else {
5303 __ cmp(reg, Operand(target)); 5302 __ cmp(reg, Operand(target));
5304 } 5303 }
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
6000 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5999 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
6001 __ ldr(result, FieldMemOperand(scratch, 6000 __ ldr(result, FieldMemOperand(scratch,
6002 FixedArray::kHeaderSize - kPointerSize)); 6001 FixedArray::kHeaderSize - kPointerSize));
6003 __ bind(&done); 6002 __ bind(&done);
6004 } 6003 }
6005 6004
6006 6005
6007 #undef __ 6006 #undef __
6008 6007
6009 } } // namespace v8::internal 6008 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/arm/deoptimizer-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698