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

Unified Diff: src/code-stub-assembler.cc

Issue 1948433002: [stubs] Convert InternalArrayNoArgumentsConstructor to a TurboFan stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/code-stub-assembler.h ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 7773266d4eeb11ea987571572260038aa4256123..8f6ae1fe53917ccaf6a0f65b399de14af745994b 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -556,6 +556,12 @@ Node* CodeStubAssembler::LoadNativeContext(Node* context) {
Context::NATIVE_CONTEXT_INDEX);
}
+Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind,
+ Node* native_context) {
+ return LoadFixedArrayElementConstantIndex(native_context,
+ Context::ArrayMapIndex(kind));
+}
+
Node* CodeStubAssembler::StoreHeapNumberValue(Node* object, Node* value) {
return StoreNoWriteBarrier(
MachineRepresentation::kFloat64, object,
@@ -670,9 +676,8 @@ Node* CodeStubAssembler::AllocateSeqTwoByteString(int length) {
return result;
}
-Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind,
- Node* native_context, int capacity,
- int length,
+Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind, Node* array_map,
+ int capacity, int length,
compiler::Node* allocation_site) {
bool is_double = IsFastDoubleElementsKind(kind);
int element_size = is_double ? kDoubleSize : kPointerSize;
@@ -688,8 +693,6 @@ Node* CodeStubAssembler::AllocateJSArray(ElementsKind kind,
// Allocate both array and elements object, and initialize the JSArray.
Heap* heap = isolate()->heap();
Node* array = Allocate(total_size);
- Node* array_map = LoadFixedArrayElementConstantIndex(
- native_context, Context::ArrayMapIndex(kind));
StoreMapNoWriteBarrier(array, array_map);
Node* empty_properties =
HeapConstant(Handle<HeapObject>(heap->empty_fixed_array()));
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698