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

Unified Diff: src/builtins.h

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.h
===================================================================
--- src/builtins.h (revision 7267)
+++ src/builtins.h (working copy)
@@ -240,21 +240,24 @@
V(APPLY_OVERFLOW, 1)
+class BuiltinFunctionTable;
class ObjectVisitor;
-class Builtins : public AllStatic {
+class Builtins {
public:
+ ~Builtins();
+
// Generate all builtin code objects. Should be called once during
- // VM initialization.
- static void Setup(bool create_heap_objects);
- static void TearDown();
+ // isolate initialization.
+ void Setup(bool create_heap_objects);
+ void TearDown();
// Garbage collection support.
- static void IterateBuiltins(ObjectVisitor* v);
+ void IterateBuiltins(ObjectVisitor* v);
// Disassembler support.
- static const char* Lookup(byte* pc);
+ const char* Lookup(byte* pc);
enum Name {
#define DEF_ENUM_C(name, ignore) name,
@@ -281,13 +284,13 @@
id_count
};
- static Code* builtin(Name name) {
+ Code* builtin(Name name) {
// Code::cast cannot be used here since we access builtins
// during the marking phase of mark sweep. See IC::Clear.
return reinterpret_cast<Code*>(builtins_[name]);
}
- static Address builtin_address(Name name) {
+ Address builtin_address(Name name) {
return reinterpret_cast<Address>(&builtins_[name]);
}
@@ -297,20 +300,24 @@
static const char* GetName(JavaScript id) { return javascript_names_[id]; }
static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; }
- static Handle<Code> GetCode(JavaScript id, bool* resolved);
+ Handle<Code> GetCode(JavaScript id, bool* resolved);
static int NumberOfJavaScriptBuiltins() { return id_count; }
+ bool is_initialized() const { return initialized_; }
+
private:
+ Builtins();
+
// The external C++ functions called from the code.
- static Address c_functions_[cfunction_count];
+ static Address const c_functions_[cfunction_count];
// Note: These are always Code objects, but to conform with
// IterateBuiltins() above which assumes Object**'s for the callback
// function f, we use an Object* array here.
- static Object* builtins_[builtin_count];
- static const char* names_[builtin_count];
- static const char* javascript_names_[id_count];
- static int javascript_argc_[id_count];
+ Object* builtins_[builtin_count];
+ const char* names_[builtin_count];
+ static const char* const javascript_names_[id_count];
+ static int const javascript_argc_[id_count];
static void Generate_Adaptor(MacroAssembler* masm,
CFunctionId id,
@@ -335,8 +342,16 @@
static void Generate_ArrayConstructCode(MacroAssembler* masm);
static void Generate_StringConstructCode(MacroAssembler* masm);
+ static void Generate_OnStackReplacement(MacroAssembler* masm);
- static void Generate_OnStackReplacement(MacroAssembler* masm);
+ static void InitBuiltinFunctionTable();
+
+ bool initialized_;
+
+ friend class BuiltinFunctionTable;
+ friend class Isolate;
+
+ DISALLOW_COPY_AND_ASSIGN(Builtins);
};
} } // namespace v8::internal
« no previous file with comments | « src/bootstrapper.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698