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

Side by Side Diff: src/runtime.cc

Issue 141038: Implemented a ContextSlotCache for compiled code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 for (int i = 0; i < properties->length(); i++) { 117 for (int i = 0; i < properties->length(); i++) {
118 Object* value = properties->get(i); 118 Object* value = properties->get(i);
119 if (value->IsJSObject()) { 119 if (value->IsJSObject()) {
120 JSObject* jsObject = JSObject::cast(value); 120 JSObject* jsObject = JSObject::cast(value);
121 result = DeepCopyBoilerplate(jsObject); 121 result = DeepCopyBoilerplate(jsObject);
122 if (result->IsFailure()) return result; 122 if (result->IsFailure()) return result;
123 properties->set(i, result, mode); 123 properties->set(i, result, mode);
124 } 124 }
125 } 125 }
126 mode = copy->GetWriteBarrierMode(); 126 mode = copy->GetWriteBarrierMode();
127 for (int i = 0; i < copy->map()->inobject_properties(); i++) { 127 int nof = copy->map()->inobject_properties();
128 for (int i = 0; i < nof; i++) {
128 Object* value = copy->InObjectPropertyAt(i); 129 Object* value = copy->InObjectPropertyAt(i);
129 if (value->IsJSObject()) { 130 if (value->IsJSObject()) {
130 JSObject* jsObject = JSObject::cast(value); 131 JSObject* jsObject = JSObject::cast(value);
131 result = DeepCopyBoilerplate(jsObject); 132 result = DeepCopyBoilerplate(jsObject);
132 if (result->IsFailure()) return result; 133 if (result->IsFailure()) return result;
133 copy->InObjectPropertyAtPut(i, result, mode); 134 copy->InObjectPropertyAtPut(i, result, mode);
134 } 135 }
135 } 136 }
136 } else { 137 } else {
137 result = Heap::AllocateFixedArray(copy->NumberOfLocalProperties(NONE)); 138 result = Heap::AllocateFixedArray(copy->NumberOfLocalProperties(NONE));
(...skipping 7379 matching lines...) Expand 10 before | Expand all | Expand 10 after
7517 } else { 7518 } else {
7518 // Handle last resort GC and make sure to allow future allocations 7519 // Handle last resort GC and make sure to allow future allocations
7519 // to grow the heap without causing GCs (if possible). 7520 // to grow the heap without causing GCs (if possible).
7520 Counters::gc_last_resort_from_js.Increment(); 7521 Counters::gc_last_resort_from_js.Increment();
7521 Heap::CollectAllGarbage(); 7522 Heap::CollectAllGarbage();
7522 } 7523 }
7523 } 7524 }
7524 7525
7525 7526
7526 } } // namespace v8::internal 7527 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698