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

Side by Side Diff: src/deoptimizer.cc

Issue 26006004: Annotate V8 for MemorySanitizer. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « src/builtins.cc ('k') | src/frames.cc » ('j') | src/msan.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 16 matching lines...) Expand all
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "accessors.h" 30 #include "accessors.h"
31 #include "codegen.h" 31 #include "codegen.h"
32 #include "deoptimizer.h" 32 #include "deoptimizer.h"
33 #include "disasm.h" 33 #include "disasm.h"
34 #include "full-codegen.h" 34 #include "full-codegen.h"
35 #include "global-handles.h" 35 #include "global-handles.h"
36 #include "macro-assembler.h" 36 #include "macro-assembler.h"
37 #include "msan.h"
37 #include "prettyprinter.h" 38 #include "prettyprinter.h"
38 39
39 40
40 namespace v8 { 41 namespace v8 {
41 namespace internal { 42 namespace internal {
42 43
43 static MemoryChunk* AllocateCodeChunk(MemoryAllocator* allocator) { 44 static MemoryChunk* AllocateCodeChunk(MemoryAllocator* allocator) {
44 return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(), 45 return allocator->AllocateChunk(Deoptimizer::GetMaxDeoptTableSize(),
45 OS::CommitPageSize(), 46 OS::CommitPageSize(),
46 #if defined(__native_client__) 47 #if defined(__native_client__)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 103
103 // We rely on this function not causing a GC. It is called from generated code 104 // We rely on this function not causing a GC. It is called from generated code
104 // without having a real stack frame in place. 105 // without having a real stack frame in place.
105 Deoptimizer* Deoptimizer::New(JSFunction* function, 106 Deoptimizer* Deoptimizer::New(JSFunction* function,
106 BailoutType type, 107 BailoutType type,
107 unsigned bailout_id, 108 unsigned bailout_id,
108 Address from, 109 Address from,
109 int fp_to_sp_delta, 110 int fp_to_sp_delta,
110 Isolate* isolate) { 111 Isolate* isolate) {
112 MSAN_RUNTIME_FUNCTION6(function, type, bailout_id, from, fp_to_sp_delta,
113 isolate);
111 Deoptimizer* deoptimizer = new Deoptimizer(isolate, 114 Deoptimizer* deoptimizer = new Deoptimizer(isolate,
danno 2013/10/10 14:18:07 This big unpoison of the stack is total overkill.
Evgeniy Stepanov 2013/10/10 15:08:54 Thanks, this is very helpful!
112 function, 115 function,
113 type, 116 type,
114 bailout_id, 117 bailout_id,
115 from, 118 from,
116 fp_to_sp_delta, 119 fp_to_sp_delta,
117 NULL); 120 NULL);
118 ASSERT(isolate->deoptimizer_data()->current_ == NULL); 121 ASSERT(isolate->deoptimizer_data()->current_ == NULL);
119 isolate->deoptimizer_data()->current_ = deoptimizer; 122 isolate->deoptimizer_data()->current_ = deoptimizer;
120 return deoptimizer; 123 return deoptimizer;
121 } 124 }
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 2941
2939 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 2942 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
2940 v->VisitPointer(BitCast<Object**>(&function_)); 2943 v->VisitPointer(BitCast<Object**>(&function_));
2941 v->VisitPointers(parameters_, parameters_ + parameters_count_); 2944 v->VisitPointers(parameters_, parameters_ + parameters_count_);
2942 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 2945 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
2943 } 2946 }
2944 2947
2945 #endif // ENABLE_DEBUGGER_SUPPORT 2948 #endif // ENABLE_DEBUGGER_SUPPORT
2946 2949
2947 } } // namespace v8::internal 2950 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/frames.cc » ('j') | src/msan.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698