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

Unified Diff: src/code-stubs.cc

Issue 368263003: Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed remaining issues. Created 6 years, 5 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-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 3ffe12ab6cf8822325c3acb8817b21ee668da1e3..cc92dbe68777cd834e8a8dfe5828a34b21a6593d 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -683,6 +683,18 @@ void StoreGlobalStub::InitializeInterfaceDescriptor(
}
+void GrowArrayElementsStub::InitializeInterfaceDescriptor(
+ CodeStubInterfaceDescriptor* descriptor) {
+ Register registers[] = { InterfaceDescriptor::ContextRegister(),
+ ObjectRegister(),
+ KeyRegister(),
+ CapacityRegister() };
+ Address deopt_handler = Runtime::FunctionForId(
+ Runtime::kGrowArrayElements)->entry;
+ descriptor->Initialize(ARRAY_SIZE(registers), registers, deopt_handler);
+}
+
+
void KeyedLoadDictionaryElementPlatformStub::Generate(
MacroAssembler* masm) {
KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
@@ -695,6 +707,20 @@ void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
}
+void GrowArrayElementsStub::GenerateAheadOfTime(Isolate* isolate) {
+ // Generate for all elements kinds
+ int last_index = GetSequenceIndexFromFastElementsKind(
+ TERMINAL_FAST_ELEMENTS_KIND);
+ for (int i = 0; i <= last_index; ++i) {
+ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
+ GrowArrayElementsStub stub1(isolate, true, kind);
+ stub1.GetCode();
+ GrowArrayElementsStub stub2(isolate, false, kind);
+ stub2.GetCode();
+ }
+}
+
+
void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
switch (elements_kind_) {
case FAST_ELEMENTS:
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698