Added caching of RegExp data in compilation cache.

Added Visual Studio project file for d8 shell.

Fixed function call performance regression introduced in version 0.4.0 when splitting the global object in two parts (issue 120).

Fixed issue 131 by checking for empty handles before throwing and reporting exceptions.


git-svn-id: http://v8.googlecode.com/svn/trunk@618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/compiler.cc b/src/compiler.cc
index 999cf4c..11ac145 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -189,7 +189,7 @@
     // Compile the function and add it to the cache.
     result = MakeFunction(true, false, script, extension, pre_data);
     if (extension == NULL && !result.is_null()) {
-      CompilationCache::Associate(source, CompilationCache::SCRIPT, result);
+      CompilationCache::PutFunction(source, CompilationCache::SCRIPT, result);
     }
 
     // Get rid of the pre-parsing data (if necessary).
@@ -223,7 +223,7 @@
     script->set_line_offset(Smi::FromInt(line_offset));
     result = MakeFunction(is_global, true, script, NULL, NULL);
     if (!result.is_null()) {
-      CompilationCache::Associate(source, entry, result);
+      CompilationCache::PutFunction(source, entry, result);
     }
   }
   return result;