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

Side by Side Diff: src/compiler.h

Issue 11418138: Fix valgrind warnings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | « no previous file | src/optimizing-compiler-thread.h » ('j') | src/optimizing-compiler-thread.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 const char* bailout_reason_; 286 const char* bailout_reason_;
287 287
288 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); 288 DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
289 }; 289 };
290 290
291 291
292 // Exactly like a CompilationInfo, except also creates and enters a 292 // Exactly like a CompilationInfo, except also creates and enters a
293 // Zone on construction and deallocates it on exit. 293 // Zone on construction and deallocates it on exit.
294 class CompilationInfoWithZone: public CompilationInfo { 294 class CompilationInfoWithZone: public CompilationInfo {
295 public: 295 public:
296 INLINE(void* operator new(size_t size)) { return Malloced::New(size); }
Yang 2012/11/23 15:46:20 We use a SmartPointer to delete CompilationInfoWit
297
296 explicit CompilationInfoWithZone(Handle<Script> script) 298 explicit CompilationInfoWithZone(Handle<Script> script)
297 : CompilationInfo(script, &zone_), 299 : CompilationInfo(script, &zone_),
298 zone_(script->GetIsolate()), 300 zone_(script->GetIsolate()),
299 zone_scope_(&zone_, DELETE_ON_EXIT) {} 301 zone_scope_(&zone_, DELETE_ON_EXIT) {}
300 explicit CompilationInfoWithZone(Handle<SharedFunctionInfo> shared_info) 302 explicit CompilationInfoWithZone(Handle<SharedFunctionInfo> shared_info)
301 : CompilationInfo(shared_info, &zone_), 303 : CompilationInfo(shared_info, &zone_),
302 zone_(shared_info->GetIsolate()), 304 zone_(shared_info->GetIsolate()),
303 zone_scope_(&zone_, DELETE_ON_EXIT) {} 305 zone_scope_(&zone_, DELETE_ON_EXIT) {}
304 explicit CompilationInfoWithZone(Handle<JSFunction> closure) 306 explicit CompilationInfoWithZone(Handle<JSFunction> closure)
305 : CompilationInfo(closure, &zone_), 307 : CompilationInfo(closure, &zone_),
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 470
469 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 471 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
470 CompilationInfo* info, 472 CompilationInfo* info,
471 Handle<SharedFunctionInfo> shared); 473 Handle<SharedFunctionInfo> shared);
472 }; 474 };
473 475
474 476
475 } } // namespace v8::internal 477 } } // namespace v8::internal
476 478
477 #endif // V8_COMPILER_H_ 479 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/optimizing-compiler-thread.h » ('j') | src/optimizing-compiler-thread.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698