From a48b2e5431e6eec9fcfd97e90823892ce21203b8 Mon Sep 17 00:00:00 2001 From: Michael Achenbach Date: Wed, 4 Mar 2015 11:44:33 +0100 Subject: [PATCH] Version 4.2.77.3 (cherry-pick) Merged cd87f25a2ee3f6f2dd5a65786c72f213646c476f Merged 47913ba79c0fcc2ee9fe9a251eb35967cdd7a704 X87: Stop using HeapType in IC and Crankshaft. Add the dummy implementation for turbofan unsupported port. TBR=chunyang.dai@intel.com,bmeurer@chromium.org BUG= Review URL: https://codereview.chromium.org/979763002 Cr-Commit-Position: refs/branch-heads/4.2@{#4} Cr-Branched-From: 3dfd929ea07487f2295553df397720d8d75d227c-refs/heads/4.2.77@{#2} Cr-Branched-From: e0110920d6f98f0ba2ac0d680f635ae3f094a04e-refs/heads/master@{#26757} --- include/v8-version.h | 2 +- src/compiler/instruction-selector.cc | 8 ++++++++ src/ic/x87/handler-compiler-x87.cc | 22 ++++++++++------------ src/ic/x87/ic-compiler-x87.cc | 11 +++++------ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/include/v8-version.h b/include/v8-version.h index 7818c3451ae..76c90bd3e15 100644 --- a/include/v8-version.h +++ b/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 4 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 77 -#define V8_PATCH_LEVEL 2 +#define V8_PATCH_LEVEL 3 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index c170a01d4a2..41b957a691b 100644 --- a/src/compiler/instruction-selector.cc +++ b/src/compiler/instruction-selector.cc @@ -1214,6 +1214,14 @@ void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, } +void InstructionSelector::VisitSwitch(Node* node, BasicBlock* default_branch, + BasicBlock** case_branches, + int32_t* case_values, size_t case_count, + int32_t min_value, int32_t max_value) { + UNIMPLEMENTED(); +} + + // static MachineOperatorBuilder::Flags InstructionSelector::SupportedMachineOperatorFlags() { diff --git a/src/ic/x87/handler-compiler-x87.cc b/src/ic/x87/handler-compiler-x87.cc index 00eb077e43b..2eb10c3a3bc 100644 --- a/src/ic/x87/handler-compiler-x87.cc +++ b/src/ic/x87/handler-compiler-x87.cc @@ -17,9 +17,8 @@ namespace internal { void NamedLoadHandlerCompiler::GenerateLoadViaGetter( - MacroAssembler* masm, Handle type, Register receiver, - Register holder, int accessor_index, int expected_arguments, - Register scratch) { + MacroAssembler* masm, Handle map, Register receiver, Register holder, + int accessor_index, int expected_arguments, Register scratch) { { FrameScope scope(masm, StackFrame::INTERNAL); @@ -27,7 +26,7 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( DCHECK(!holder.is(scratch)); DCHECK(!receiver.is(scratch)); // Call the JavaScript getter with the receiver on the stack. - if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { + if (map->IsJSGlobalObjectMap()) { // Swap in the global receiver. __ mov(scratch, FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); @@ -237,9 +236,8 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell( void NamedStoreHandlerCompiler::GenerateStoreViaSetter( - MacroAssembler* masm, Handle type, Register receiver, - Register holder, int accessor_index, int expected_arguments, - Register scratch) { + MacroAssembler* masm, Handle map, Register receiver, Register holder, + int accessor_index, int expected_arguments, Register scratch) { // ----------- S t a t e ------------- // -- esp[0] : return address // ----------------------------------- @@ -254,8 +252,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( DCHECK(!receiver.is(scratch)); DCHECK(!value().is(scratch)); // Call the JavaScript setter with receiver and value on the stack. - if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { - // Swap in the global receiver. + if (map->IsJSGlobalObjectMap()) { __ mov(scratch, FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); receiver = scratch; @@ -419,7 +416,7 @@ Register PropertyHandlerCompiler::CheckPrototypes( Register object_reg, Register holder_reg, Register scratch1, Register scratch2, Handle name, Label* miss, PrototypeCheckType check) { - Handle receiver_map(IC::TypeToMap(*type(), isolate())); + Handle receiver_map = map(); // Make sure there's no overlap between holder and object registers. DCHECK(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); @@ -431,8 +428,9 @@ Register PropertyHandlerCompiler::CheckPrototypes( int depth = 0; Handle current = Handle::null(); - if (type()->IsConstant()) - current = Handle::cast(type()->AsConstant()->Value()); + if (receiver_map->IsJSGlobalObjectMap()) { + current = isolate()->global_object(); + } Handle prototype = Handle::null(); Handle current_map = receiver_map; Handle holder_map(holder()->map()); diff --git a/src/ic/x87/ic-compiler-x87.cc b/src/ic/x87/ic-compiler-x87.cc index 544514f8267..160e9e9c673 100644 --- a/src/ic/x87/ic-compiler-x87.cc +++ b/src/ic/x87/ic-compiler-x87.cc @@ -36,7 +36,7 @@ void PropertyICCompiler::GenerateRuntimeSetProperty( #undef __ #define __ ACCESS_MASM(masm()) -Handle PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, +Handle PropertyICCompiler::CompilePolymorphic(MapHandleList* maps, CodeHandleList* handlers, Handle name, Code::StubType type, @@ -63,7 +63,7 @@ Handle PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, } Label number_case; - Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; + Label* smi_target = IncludesNumberMap(maps) ? &number_case : &miss; __ JumpIfSmi(receiver(), smi_target); // Polymorphic keyed stores may use the map register @@ -71,16 +71,15 @@ Handle PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, DCHECK(kind() != Code::KEYED_STORE_IC || map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister())); __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); - int receiver_count = types->length(); + int receiver_count = maps->length(); int number_of_handled_maps = 0; for (int current = 0; current < receiver_count; ++current) { - Handle type = types->at(current); - Handle map = IC::TypeToMap(*type, isolate()); + Handle map = maps->at(current); if (!map->is_deprecated()) { number_of_handled_maps++; Handle cell = Map::WeakCellForMap(map); __ CmpWeakValue(map_reg, cell, scratch2()); - if (type->Is(HeapType::Number())) { + if (map->instance_type() == HEAP_NUMBER_TYPE) { DCHECK(!number_case.is_unused()); __ bind(&number_case); }