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

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

Issue 18191007: MIPS: Hydrogen array constructor cleanup and improvements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 2da8fc0ffeed283044d44f8a9331afaeb8b12096..9ba05533531a3bfb7ee3606af2862128d98b60f8 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -5045,11 +5045,15 @@ 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(masm->isolate(),
- LAST_FAST_ELEMENTS_KIND);
__ JumpIfNotSmi(a3, &miss);
- __ Branch(&miss, gt, a3, Operand(terminal_kind_sentinel));
+ if (FLAG_debug_code) {
+ Handle<Object> terminal_kind_sentinel =
+ TypeFeedbackCells::MonomorphicArraySentinel(masm->isolate(),
+ LAST_FAST_ELEMENTS_KIND);
+ __ Assert(le, "Array function sentinel is not an ElementsKind",
+ a3, Operand(terminal_kind_sentinel));
+ }
+
// Make sure the function is the Array() function
__ LoadArrayFunction(a3);
__ Branch(&megamorphic, ne, a1, Operand(a3));
@@ -7614,6 +7618,10 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm) {
__ Addu(a3, a3, Operand(1));
__ Branch(&normal_sequence, eq, a2, Operand(undefined_sentinel));
+ // The type cell may have gone megamorphic, don't overwrite if so.
+ __ lw(t1, FieldMemOperand(a2, kPointerSize));
+ __ JumpIfNotSmi(t1, &normal_sequence);
+
// Save the resulting elements kind in type info
__ SmiTag(a3);
__ sw(a3, FieldMemOperand(a2, kPointerSize));
@@ -7645,7 +7653,7 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
T stub(kind);
stub.GetCode(isolate)->set_is_pregenerated(true);
if (AllocationSiteInfo::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE) {
- T stub1(kind, true);
+ T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
stub1.GetCode(isolate)->set_is_pregenerated(true);
}
}
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698