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

Side by Side Diff: src/ia32/macro-assembler-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 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 // The registers are pushed starting with the lowest encoding, 2486 // The registers are pushed starting with the lowest encoding,
2487 // which means that lowest encodings are furthest away from 2487 // which means that lowest encodings are furthest away from
2488 // the stack pointer. 2488 // the stack pointer.
2489 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); 2489 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters);
2490 return kNumSafepointRegisters - reg_code - 1; 2490 return kNumSafepointRegisters - reg_code - 1;
2491 } 2491 }
2492 2492
2493 2493
2494 void MacroAssembler::LoadHeapObject(Register result, 2494 void MacroAssembler::LoadHeapObject(Register result,
2495 Handle<HeapObject> object) { 2495 Handle<HeapObject> object) {
2496 ALLOW_HANDLE_DEREF(isolate(), "embedding raw address"); 2496 AllowDeferredHandleDereference embedding_raw_address;
2497 if (isolate()->heap()->InNewSpace(*object)) { 2497 if (isolate()->heap()->InNewSpace(*object)) {
2498 Handle<JSGlobalPropertyCell> cell = 2498 Handle<JSGlobalPropertyCell> cell =
2499 isolate()->factory()->NewJSGlobalPropertyCell(object); 2499 isolate()->factory()->NewJSGlobalPropertyCell(object);
2500 mov(result, Operand::Cell(cell)); 2500 mov(result, Operand::Cell(cell));
2501 } else { 2501 } else {
2502 mov(result, object); 2502 mov(result, object);
2503 } 2503 }
2504 } 2504 }
2505 2505
2506 2506
2507 void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) { 2507 void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
2508 ALLOW_HANDLE_DEREF(isolate(), "using raw address"); 2508 AllowDeferredHandleDereference using_raw_address;
2509 if (isolate()->heap()->InNewSpace(*object)) { 2509 if (isolate()->heap()->InNewSpace(*object)) {
2510 Handle<JSGlobalPropertyCell> cell = 2510 Handle<JSGlobalPropertyCell> cell =
2511 isolate()->factory()->NewJSGlobalPropertyCell(object); 2511 isolate()->factory()->NewJSGlobalPropertyCell(object);
2512 cmp(reg, Operand::Cell(cell)); 2512 cmp(reg, Operand::Cell(cell));
2513 } else { 2513 } else {
2514 cmp(reg, object); 2514 cmp(reg, object);
2515 } 2515 }
2516 } 2516 }
2517 2517
2518 2518
2519 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) { 2519 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
2520 ALLOW_HANDLE_DEREF(isolate(), "using raw address"); 2520 AllowDeferredHandleDereference using_raw_address;
2521 if (isolate()->heap()->InNewSpace(*object)) { 2521 if (isolate()->heap()->InNewSpace(*object)) {
2522 Handle<JSGlobalPropertyCell> cell = 2522 Handle<JSGlobalPropertyCell> cell =
2523 isolate()->factory()->NewJSGlobalPropertyCell(object); 2523 isolate()->factory()->NewJSGlobalPropertyCell(object);
2524 push(Operand::Cell(cell)); 2524 push(Operand::Cell(cell));
2525 } else { 2525 } else {
2526 Push(object); 2526 Push(object);
2527 } 2527 }
2528 } 2528 }
2529 2529
2530 2530
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 j(greater, &no_info_available); 3151 j(greater, &no_info_available);
3152 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3152 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3153 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3153 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3154 bind(&no_info_available); 3154 bind(&no_info_available);
3155 } 3155 }
3156 3156
3157 3157
3158 } } // namespace v8::internal 3158 } } // namespace v8::internal
3159 3159
3160 #endif // V8_TARGET_ARCH_IA32 3160 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/api.cc ('K') | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698