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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 17091002: Hydrogen array constructor cleanup and improvements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index ab3064fc26bfb5552a43ffcc7b91c0161b434bbc..c8bee9d90ecd546f3a9825a6a967c4868e7fe5a1 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -3739,12 +3739,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// Special handling of the Array() function, which caches not only the
// monomorphic Array function but the initial ElementsKind with special
// sentinels
- Handle<Object> terminal_kind_sentinel =
- TypeFeedbackCells::MonomorphicArraySentinel(isolate,
- LAST_FAST_ELEMENTS_KIND);
__ JumpIfNotSmi(rcx, &miss);
- __ Cmp(rcx, terminal_kind_sentinel);
- __ j(above, &miss);
// Make sure the function is the Array() function
__ LoadArrayFunction(rcx);
__ cmpq(rdi, rcx);
@@ -6801,6 +6796,10 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm) {
__ Cmp(rbx, undefined_sentinel);
__ j(equal, &normal_sequence);
+ // The type cell may have gone megamorphic, don't overwrite if so
+ __ movq(rcx, FieldOperand(rbx, kPointerSize));
+ __ JumpIfNotSmi(rcx, &normal_sequence);
+
// Save the resulting elements kind in type info
__ Integer32ToSmi(rdx, rdx);
__ movq(FieldOperand(rbx, kPointerSize), rdx);
« src/hydrogen.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698