Version 3.0.10

Fixed External::Wrap for 64-bit addresses (issue 1037).

Fixed incorrect .arguments variable proxy handling in the full code generator (issue 1060).

Introduced partial strict mode support.

Changed formatting of recursive error messages to match Firefox and Safari (issue http://crbug.com/70334).

Fixed incorrect rounding for float-to-integer conversions for external array types, which implement the Typed Array spec (issue http://crbug.com/50972).

Performance improvements on the IA32 platform.


git-svn-id: http://v8.googlecode.com/svn/trunk@6439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index 755e8cd..761ff7e 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -318,6 +318,7 @@
     : file_(file), memory_(memory), size_(size) { }
   virtual ~PosixMemoryMappedFile();
   virtual void* memory() { return memory_; }
+  virtual int size() { return size_; }
  private:
   FILE* file_;
   void* memory_;
@@ -325,6 +326,19 @@
 };
 
 
+OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name) {
+  FILE* file = fopen(name, "w+");
+  if (file == NULL) return NULL;
+
+  fseek(file, 0, SEEK_END);
+  int size = ftell(file);
+
+  void* memory =
+      mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
+  return new PosixMemoryMappedFile(file, memory, size);
+}
+
+
 OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
     void* initial) {
   FILE* file = fopen(name, "w+");