From 4635a1252501abba9bb3a0a31adace32f256d030 Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Wed, 16 Apr 2014 19:02:58 +0000 Subject: [PATCH] MIPS: Implement structural function and array types Port r20817 (e7a84c1) Original commit message: Just wanted to add two constructors to a datatype, how ugly can it get? BUG= R=plind44@gmail.com Review URL: https://codereview.chromium.org/240463004 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/stub-cache-mips.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index 45aadc8..2cd61f9 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -417,7 +417,7 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, } else if (representation.IsHeapObject()) { HeapType* field_type = descriptors->GetFieldType(descriptor); if (field_type->IsClass()) { - __ CheckMap(value_reg, scratch1, field_type->AsClass(), + __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), miss_label, DO_SMI_CHECK); } else { ASSERT(HeapType::Any()->Is(field_type)); @@ -587,7 +587,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm, } else if (representation.IsHeapObject()) { HeapType* field_type = lookup->GetFieldType(); if (field_type->IsClass()) { - __ CheckMap(value_reg, scratch1, field_type->AsClass(), + __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), miss_label, DO_SMI_CHECK); } else { ASSERT(HeapType::Any()->Is(field_type)); @@ -838,7 +838,9 @@ Register StubCompiler::CheckPrototypes(Handle type, int depth = 0; Handle current = Handle::null(); - if (type->IsConstant()) current = Handle::cast(type->AsConstant()); + if (type->IsConstant()) { + current = Handle::cast(type->AsConstant()->Value()); + } Handle prototype = Handle::null(); Handle current_map = receiver_map; Handle holder_map(holder->map()); -- 2.7.4