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

Unified Diff: src/objects.cc

Issue 40290: Experimental: Merge 1395:1441 from bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/global/
Patch Set: Created 11 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/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 1441)
+++ src/objects.cc (working copy)
@@ -4872,10 +4872,13 @@
}
-void Code::Disassemble() {
- PrintF("kind = %s", Kind2String(kind()));
+void Code::Disassemble(const char* name) {
+ PrintF("kind = %s\n", Kind2String(kind()));
+ if ((name != NULL) && (name[0] != '\0')) {
+ PrintF("name = %s\n", name);
+ }
- PrintF("\nInstructions (size = %d)\n", instruction_size());
+ PrintF("Instructions (size = %d)\n", instruction_size());
Disassembler::Decode(NULL, this);
PrintF("\n");
@@ -4956,20 +4959,6 @@
}
-void JSArray::EnsureSize(int required_size) {
- ASSERT(HasFastElements());
- if (elements()->length() >= required_size) return;
- Handle<FixedArray> old_backing(elements());
- int old_size = old_backing->length();
- // Doubling in size would be overkill, but leave some slack to avoid
- // constantly growing.
- int new_size = required_size + (required_size >> 3);
- Handle<FixedArray> new_backing = Factory::NewFixedArray(new_size);
- for (int i = 0; i < old_size; i++) new_backing->set(i, old_backing->get(i));
- SetContent(*new_backing);
-}
-
-
// Computes the new capacity when expanding the elements of a JSObject.
static int NewElementsCapacity(int old_capacity) {
// (old_capacity + 50%) + 16
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698