summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-23 09:44:26 -0700
committerFeng Qian <fqian@google.com>2009-06-23 09:44:26 -0700
commit3e119f4f9bb36bc17675f4b60284508e1400944c (patch)
tree24daadd0c85ead8b2fd89d66342d3c05e1f0f5f8 /V8Binding/v8
parent616ad0c2b4a8561fcf943605dd2b64725bc41145 (diff)
downloadexternal_webkit-3e119f4f9bb36bc17675f4b60284508e1400944c.zip
external_webkit-3e119f4f9bb36bc17675f4b60284508e1400944c.tar.gz
external_webkit-3e119f4f9bb36bc17675f4b60284508e1400944c.tar.bz2
Workaround gcc4.4. issue.
I am upstreaming the change to v8 code.
Diffstat (limited to 'V8Binding/v8')
-rw-r--r--V8Binding/v8/src/heap.cc53
-rw-r--r--V8Binding/v8/src/heap.h8
2 files changed, 45 insertions, 16 deletions
diff --git a/V8Binding/v8/src/heap.cc b/V8Binding/v8/src/heap.cc
index 772cf32..df8ae6b 100644
--- a/V8Binding/v8/src/heap.cc
+++ b/V8Binding/v8/src/heap.cc
@@ -1220,28 +1220,49 @@ bool Heap::CreateApiObjects() {
return true;
}
+
+void Heap::CreateCEntryStub() {
+ CEntryStub stub;
+ c_entry_code_ = *stub.GetCode();
+}
+
+
+void Heap::CreateCEntryDebugBreakStub() {
+ CEntryDebugBreakStub stub;
+ c_entry_debug_break_code_ = *stub.GetCode();
+}
+
+
+void Heap::CreateJSEntryStub() {
+ JSEntryStub stub;
+ js_entry_code_ = *stub.GetCode();
+}
+
+
+void Heap::CreateJSConstructEntryStub() {
+ JSConstructEntryStub stub;
+ js_construct_entry_code_ = *stub.GetCode();
+}
+
+
void Heap::CreateFixedStubs() {
// Here we create roots for fixed stubs. They are needed at GC
// for cooking and uncooking (check out frames.cc).
// The eliminates the need for doing dictionary lookup in the
// stub cache for these stubs.
HandleScope scope;
- {
- CEntryStub stub;
- c_entry_code_ = *stub.GetCode();
- }
- {
- CEntryDebugBreakStub stub;
- c_entry_debug_break_code_ = *stub.GetCode();
- }
- {
- JSEntryStub stub;
- js_entry_code_ = *stub.GetCode();
- }
- {
- JSConstructEntryStub stub;
- js_construct_entry_code_ = *stub.GetCode();
- }
+ // gcc-4.4 has problem to generate the correct vtables if the following
+ // functions are inlined. e.g.,
+ // { CEntryStub stub;
+ // c_entry_code_ = *stub.GetCode();
+ // }
+ // { CEntryDebugBreakStub stub;
+ // c_entry_debug_break_code_ = *stub.GetCode();
+ // }
+ Heap::CreateCEntryStub();
+ Heap::CreateCEntryDebugBreakStub();
+ Heap::CreateJSEntryStub();
+ Heap::CreateJSConstructEntryStub();
}
diff --git a/V8Binding/v8/src/heap.h b/V8Binding/v8/src/heap.h
index d8080b6..856de20 100644
--- a/V8Binding/v8/src/heap.h
+++ b/V8Binding/v8/src/heap.h
@@ -936,6 +936,14 @@ class Heap : public AllStatic {
static bool CreateInitialMaps();
static bool CreateInitialObjects();
+
+ // These four Create*EntryStub functions are here because of a gcc-4.4 bug
+ // that assign wrong vptr entries.
+ static void CreateCEntryStub();
+ static void CreateCEntryDebugBreakStub();
+ static void CreateJSEntryStub();
+ static void CreateJSConstructEntryStub();
+
static void CreateFixedStubs();
static Object* CreateOddball(Map* map,
const char* to_string,