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

Unified Diff: regexp2000/src/heap.cc

Issue 11271: Building on regexp-ia32. (Closed)
Patch Set: Made it compile correctly. Created 12 years, 1 month 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
Index: regexp2000/src/heap.cc
diff --git a/regexp2000/src/heap.cc b/regexp2000/src/heap.cc
index cc894dd78bb5f42cdaa21e4b6c3b78efda808f76..2053a5dd795209ddfe3bff379e8050e5ce9fdcf6 100644
--- a/regexp2000/src/heap.cc
+++ b/regexp2000/src/heap.cc
@@ -1624,7 +1624,8 @@ Object* Heap::AllocateByteArray(int length) {
Object* Heap::CreateCode(const CodeDesc& desc,
ScopeInfo<>* sinfo,
- Code::Flags flags) {
+ Code::Flags flags,
+ Handle<Code>* self) {
Erik Corry 2008/11/21 13:03:04 As discussed offline this should be passed by valu
Lasse Reichstein 2008/11/24 08:32:33 Done.
// Compute size
int body_size = RoundUp(desc.instr_size + desc.reloc_size, kObjectAlignment);
int sinfo_size = 0;
@@ -1647,6 +1648,10 @@ Object* Heap::CreateCode(const CodeDesc& desc,
code->set_sinfo_size(sinfo_size);
code->set_flags(flags);
code->set_ic_flag(Code::IC_TARGET_IS_ADDRESS);
+ if (self != NULL) {
+ // Allow self references to created code object.
+ *(self->location()) = code;
+ }
code->CopyFrom(desc); // migrate generated code
Erik Corry 2008/11/21 13:03:04 A comment here to the effect that CopyFrom may mak
Lasse Reichstein 2008/11/24 08:32:33 Done.
if (sinfo != NULL) sinfo->Serialize(code); // write scope info

Powered by Google App Engine
This is Rietveld 408576698