Reviewers: Jakob,

Description:
Drop globals.h include from platform.h

Also delete dead cpu-features-implied-by-platform code.

BUG=none
[email protected]
LOG=n

Please review this at https://codereview.chromium.org/326333002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -24 lines):
  M src/arm/assembler-arm.cc
  M src/ia32/assembler-ia32.cc
  M src/mips/assembler-mips.cc
  M src/platform.h
  M src/platform-posix.cc
  M src/platform-win32.cc
  M src/x64/assembler-x64.cc
  M src/x87/assembler-x87.cc


Index: src/arm/assembler-arm.cc
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc
index c3f9ab0b9b2501997a7f83d154b1607c6fad6ca3..ca5aad3f69f37c6f6c7a46bec66660c28fe088c8 100644
--- a/src/arm/assembler-arm.cc
+++ b/src/arm/assembler-arm.cc
@@ -72,7 +72,6 @@ static unsigned CpuFeaturesImpliedByCompiler() {


 void CpuFeatures::ProbeImpl(bool cross_compile) {
-  supported_ |= OS::CpuFeaturesImpliedByPlatform();
   supported_ |= CpuFeaturesImpliedByCompiler();
   cache_line_size_ = 64;

Index: src/ia32/assembler-ia32.cc
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc
index bc17b25c3420bf1e55489c333f9bce47e43e169b..75cb6ed7c4cba1c034dfc79c7fb7aa650bb629c4 100644
--- a/src/ia32/assembler-ia32.cc
+++ b/src/ia32/assembler-ia32.cc
@@ -52,7 +52,6 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
   CPU cpu;
   CHECK(cpu.has_sse2());  // SSE2 support is mandatory.
   CHECK(cpu.has_cmov());  // CMOV support is mandatory.
-  supported_ |= OS::CpuFeaturesImpliedByPlatform();

   // Only use statically determined features for cross compile (snapshot).
   if (cross_compile) return;
Index: src/mips/assembler-mips.cc
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc
index 97aed6b552a83606ad9613b727dae17d43952cd3..e4bebfee4ba61a332b97dfa06f61e0f65329c695 100644
--- a/src/mips/assembler-mips.cc
+++ b/src/mips/assembler-mips.cc
@@ -87,7 +87,6 @@ const char* DoubleRegister::AllocationIndexToString(int index) {


 void CpuFeatures::ProbeImpl(bool cross_compile) {
-  supported_ |= OS::CpuFeaturesImpliedByPlatform();
   supported_ |= CpuFeaturesImpliedByCompiler();

   // Only use statically determined features for cross compile (snapshot).
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index e9e4161a6265c614165bc66e83111c6877c1d184..87b96e2aae77de139d934fa7d6b7490980439ce3 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -56,11 +56,6 @@ namespace internal {
 static const pthread_t kNoThread = (pthread_t) 0;


-unsigned OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // Nothing special.
-}
-
-
 int OS::NumberOfProcessorsOnline() {
   return static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
 }
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 03fb8b6491aad3d0bc9aba4f4e62c3b7395e9330..1caadbeddd527dd3fdb5833fda2510c512933fd7 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -1158,11 +1158,6 @@ void OS::SignalCodeMovingGC() { }
 #endif  // __MINGW32__


-unsigned OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // Windows runs on anything.
-}
-
-
 int OS::NumberOfProcessorsOnline() {
   SYSTEM_INFO info;
   GetSystemInfo(&info);
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 2d5101d985e3e4fe9a84b5172120481daf9d185b..3cec11329e2584ecce19b7c479d58d0747e50282 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -23,9 +23,9 @@

 #include <stdarg.h>

+#include "src/base/build_config.h"
 #include "src/platform/mutex.h"
 #include "src/platform/semaphore.h"
-#include "src/globals.h"
 #include "src/vector.h"

 #ifdef __sun
@@ -263,13 +263,6 @@ class OS {
   // using --never-compact) if accurate profiling is desired.
   static void SignalCodeMovingGC();

- // The return value indicates the CPU features we are sure of because of the
-  // OS.
- // This is a little messy because the interpretation is subject to the cross
-  // of the CPU and the OS.  The bits in the answer correspond to the bit
- // positions indicated by the members of the CpuFeature enum from globals.h
-  static unsigned CpuFeaturesImpliedByPlatform();
-
   // Returns the number of processors online.
   static int NumberOfProcessorsOnline();

Index: src/x64/assembler-x64.cc
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
index e5855d3e3c596e22fbea24447d414a1b8c6a9447..59b027f5beb9a7241d92cdbfc8fd2f806ef5fca7 100644
--- a/src/x64/assembler-x64.cc
+++ b/src/x64/assembler-x64.cc
@@ -20,8 +20,6 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
   CHECK(cpu.has_sse2());  // SSE2 support is mandatory.
   CHECK(cpu.has_cmov());  // CMOV support is mandatory.

-  supported_ |= OS::CpuFeaturesImpliedByPlatform();
-
   // Only use statically determined features for cross compile (snapshot).
   if (cross_compile) return;

Index: src/x87/assembler-x87.cc
diff --git a/src/x87/assembler-x87.cc b/src/x87/assembler-x87.cc
index 3fbcff9adce663a5d7114cb0787536e41ac10ddb..f2082c2a7f69135c501144e6c40526751b771907 100644
--- a/src/x87/assembler-x87.cc
+++ b/src/x87/assembler-x87.cc
@@ -50,7 +50,6 @@ namespace internal {

 void CpuFeatures::ProbeImpl(bool cross_compile) {
   CPU cpu;
-  supported_ |= OS::CpuFeaturesImpliedByPlatform();

   // Only use statically determined features for cross compile (snapshot).
   if (cross_compile) return;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to