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

Unified Diff: src/objects.cc

Issue 201303009: Handlification of ArrayConstructorCommon(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 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') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 787b6d82b47145688e92447ff2e57f24473ff5d7..f656391478f326b16d6322fa84650460488fc029 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11348,10 +11348,11 @@ MaybeObject* JSObject::SetFastDoubleElementsCapacityAndLength(
}
-MaybeObject* JSArray::Initialize(int capacity, int length) {
+// static
+void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
ASSERT(capacity >= 0);
- return GetHeap()->AllocateJSArrayStorage(this, length, capacity,
- INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
+ array->GetIsolate()->factory()->NewJSArrayStorage(
+ array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
}
@@ -11430,6 +11431,16 @@ static void EndPerformSplice(Handle<JSArray> object) {
}
+// TODO(ishell): Temporary wrapper until handlified.
+// static
+Handle<Object> JSArray::SetElementsLength(Handle<JSArray> array,
+ Handle<Object> length) {
+ CALL_HEAP_FUNCTION(array->GetIsolate(),
+ array->SetElementsLength(*length),
+ Object);
+}
+
+
MaybeObject* JSArray::SetElementsLength(Object* len) {
// We should never end in here with a pixel or external array.
ASSERT(AllowsSetElementsLength());
@@ -11893,6 +11904,21 @@ Handle<Object> JSObject::SetPrototype(Handle<JSObject> object,
}
+// TODO(ishell): temporary wrapper until handilfied.
+// static
+void JSObject::EnsureCanContainElements(Handle<JSObject> object,
+ Arguments* args,
+ uint32_t first_arg,
+ uint32_t arg_count,
+ EnsureElementsMode mode) {
+ CALL_HEAP_FUNCTION_VOID(object->GetIsolate(),
+ object->EnsureCanContainElements(args,
+ first_arg,
+ arg_count,
+ mode));
+}
+
+
MaybeObject* JSObject::EnsureCanContainElements(Arguments* args,
uint32_t first_arg,
uint32_t arg_count,
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698