From 0ff690b37046f0983cb03b01cda148913777c55d Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Tue, 12 Jul 2011 08:03:19 +0000 Subject: [PATCH] Fixed a long-standing TODO: Removed a few *-incl.h #includes from isolate.h. ZoneAllocationPolicy::New is not inlined anymore because this pulls in far too much stuff and doesn't really make any measurable performance difference. And no, the #includes are still not in alphabetical order... ;-) Review URL: http://codereview.chromium.org/7346006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/debug.h | 3 ++- src/frames.cc | 2 ++ src/isolate.h | 6 ------ src/scopeinfo.cc | 2 ++ src/scopes.cc | 2 ++ src/string-stream.cc | 4 +++- src/type-info.h | 1 - src/zone.h | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/debug.h b/src/debug.h index c4d3c7e..c614844 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,4 +1,4 @@ -// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -35,6 +35,7 @@ #include "execution.h" #include "factory.h" #include "flags.h" +#include "frames-inl.h" #include "hashmap.h" #include "platform.h" #include "string-stream.h" diff --git a/src/frames.cc b/src/frames.cc index 4e67463..7a1332d 100644 --- a/src/frames.cc +++ b/src/frames.cc @@ -36,6 +36,8 @@ #include "scopeinfo.h" #include "string-stream.h" +#include "allocation-inl.h" + namespace v8 { namespace internal { diff --git a/src/isolate.h b/src/isolate.h index a4af136..1d11d5c 100644 --- a/src/isolate.h +++ b/src/isolate.h @@ -1356,10 +1356,4 @@ inline void Context::mark_out_of_memory() { } } // namespace v8::internal -// TODO(isolates): Get rid of these -inl.h includes and place them only where -// they're needed. -#include "allocation-inl.h" -#include "zone-inl.h" -#include "frames-inl.h" - #endif // V8_ISOLATE_H_ diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc index ccc2cc8..3e18368 100644 --- a/src/scopeinfo.cc +++ b/src/scopeinfo.cc @@ -32,6 +32,8 @@ #include "scopeinfo.h" #include "scopes.h" +#include "allocation-inl.h" + namespace v8 { namespace internal { diff --git a/src/scopes.cc b/src/scopes.cc index 5546875..c6e2a46 100644 --- a/src/scopes.cc +++ b/src/scopes.cc @@ -34,6 +34,8 @@ #include "prettyprinter.h" #include "scopeinfo.h" +#include "allocation-inl.h" + namespace v8 { namespace internal { diff --git a/src/string-stream.cc b/src/string-stream.cc index aea1420..9002593 100644 --- a/src/string-stream.cc +++ b/src/string-stream.cc @@ -1,4 +1,4 @@ -// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -30,6 +30,8 @@ #include "factory.h" #include "string-stream.h" +#include "allocation-inl.h" + namespace v8 { namespace internal { diff --git a/src/type-info.h b/src/type-info.h index 75aabe8..0a8c935 100644 --- a/src/type-info.h +++ b/src/type-info.h @@ -30,7 +30,6 @@ #include "allocation.h" #include "globals.h" -#include "zone.h" #include "zone-inl.h" namespace v8 { diff --git a/src/zone.h b/src/zone.h index a5e437f..af9c916 100644 --- a/src/zone.h +++ b/src/zone.h @@ -164,7 +164,7 @@ class AssertNoZoneAllocation { class ZoneListAllocationPolicy { public: // Allocate 'size' bytes of memory in the zone. - INLINE(static void* New(int size)); + static void* New(int size); // De-allocation attempts are silently ignored. static void Delete(void* p) { } -- 2.7.4