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

Side by Side Diff: src/mips/deoptimizer-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 1
2 // Copyright 2011 the V8 project authors. All rights reserved. 2 // Copyright 2011 the V8 project authors. All rights reserved.
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following 10 // copyright notice, this list of conditions and the following
(...skipping 29 matching lines...) Expand all
40 int Deoptimizer::patch_size() { 40 int Deoptimizer::patch_size() {
41 const int kCallInstructionSizeInWords = 4; 41 const int kCallInstructionSizeInWords = 4;
42 return kCallInstructionSizeInWords * Assembler::kInstrSize; 42 return kCallInstructionSizeInWords * Assembler::kInstrSize;
43 } 43 }
44 44
45 45
46 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList( 46 void Deoptimizer::DeoptimizeFunctionWithPreparedFunctionList(
47 JSFunction* function) { 47 JSFunction* function) {
48 Isolate* isolate = function->GetIsolate(); 48 Isolate* isolate = function->GetIsolate();
49 HandleScope scope(isolate); 49 HandleScope scope(isolate);
50 AssertNoAllocation no_allocation; 50 DisallowHeapAllocation nha;
51 51
52 ASSERT(function->IsOptimized()); 52 ASSERT(function->IsOptimized());
53 ASSERT(function->FunctionsInFunctionListShareSameCode()); 53 ASSERT(function->FunctionsInFunctionListShareSameCode());
54 54
55 // Get the optimized code. 55 // Get the optimized code.
56 Code* code = function->code(); 56 Code* code = function->code();
57 Address code_start_address = code->instruction_start(); 57 Address code_start_address = code->instruction_start();
58 58
59 // The optimized code is going to be patched, so we cannot use it any more. 59 // The optimized code is going to be patched, so we cannot use it any more.
60 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function"); 60 function->shared()->EvictFromOptimizedCodeMap(code, "deoptimized function");
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 } 666 }
667 667
668 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), 668 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start),
669 count() * table_entry_size_); 669 count() * table_entry_size_);
670 } 670 }
671 671
672 #undef __ 672 #undef __
673 673
674 674
675 } } // namespace v8::internal 675 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/mips/assembler-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698