Revision: 22679
Author: [email protected]
Date: Tue Jul 29 16:07:34 2014 UTC
Log: Clean up name distinction between Keyed ICs and Element Handlers
BUG=
[email protected]
Review URL: https://codereview.chromium.org/424743002
http://code.google.com/p/v8/source/detail?r=22679
Modified:
/branches/bleeding_edge/src/arm/ic-arm.cc
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/arm/stub-cache-arm.cc
/branches/bleeding_edge/src/arm64/ic-arm64.cc
/branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc
/branches/bleeding_edge/src/arm64/stub-cache-arm64.cc
/branches/bleeding_edge/src/code-stubs-hydrogen.cc
/branches/bleeding_edge/src/code-stubs.cc
/branches/bleeding_edge/src/code-stubs.h
/branches/bleeding_edge/src/heap.h
/branches/bleeding_edge/src/ia32/ic-ia32.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
/branches/bleeding_edge/src/ia32/stub-cache-ia32.cc
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/ic.h
/branches/bleeding_edge/src/isolate.cc
/branches/bleeding_edge/src/stub-cache.cc
/branches/bleeding_edge/src/stub-cache.h
/branches/bleeding_edge/src/x64/ic-x64.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
/branches/bleeding_edge/src/x64/stub-cache-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/ic-arm.cc Mon Jul 21 11:19:56 2014 UTC
+++ /branches/bleeding_edge/src/arm/ic-arm.cc Tue Jul 29 16:07:34 2014 UTC
@@ -769,10 +769,9 @@
// Perform tail call to the entry.
__ TailCallExternalReference(
- ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
+ ExternalReference(IC_Utility(kLoadElementWithInterceptor),
masm->isolate()),
- 2,
- 1);
+ 2, 1);
__ bind(&slow);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Tue Jul 29
14:38:39 2014 UTC
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Tue Jul 29
16:07:34 2014 UTC
@@ -1605,7 +1605,7 @@
// Compute the hash code from the untagged key. This must be kept in sync
with
-// ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
+// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in
// code-stub-hydrogen.cc
void MacroAssembler::GetNumberHash(Register t0, Register scratch) {
// First of all we assign the hash seed to scratch.
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Tue Jul 29 16:04:07
2014 UTC
+++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Tue Jul 29 16:07:34
2014 UTC
@@ -1137,8 +1137,8 @@
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
- ExternalReference store_ic_property =
- ExternalReference(IC_Utility(IC::kStoreInterceptorProperty),
isolate());
+ ExternalReference store_ic_property = ExternalReference(
+ IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
@@ -1326,7 +1326,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
MapHandleList* receiver_maps, CodeHandleList* handler_stubs,
MapHandleList* transitioned_maps) {
Label miss;
@@ -1360,7 +1360,7 @@
#define __ ACCESS_MASM(masm)
-void IndexedHandlerCompiler::GenerateLoadDictionaryElement(
+void ElementHandlerCompiler::GenerateLoadDictionaryElement(
MacroAssembler* masm) {
// The return address is in lr.
Label slow, miss;
=======================================
--- /branches/bleeding_edge/src/arm64/ic-arm64.cc Mon Jul 21 11:19:56 2014
UTC
+++ /branches/bleeding_edge/src/arm64/ic-arm64.cc Tue Jul 29 16:07:34 2014
UTC
@@ -815,10 +815,9 @@
// Everything is fine, call runtime.
__ Push(receiver, key);
__ TailCallExternalReference(
- ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
+ ExternalReference(IC_Utility(kLoadElementWithInterceptor),
masm->isolate()),
- 2,
- 1);
+ 2, 1);
__ Bind(&slow);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Tue Jul 29
14:38:39 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Tue Jul 29
16:07:34 2014 UTC
@@ -4118,7 +4118,7 @@
// Compute the hash code from the untagged key. This must be kept in sync
with
-// ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
+// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in
// code-stub-hydrogen.cc
void MacroAssembler::GetNumberHash(Register key, Register scratch) {
ASSERT(!AreAliased(key, scratch));
=======================================
--- /branches/bleeding_edge/src/arm64/stub-cache-arm64.cc Tue Jul 29
16:04:07 2014 UTC
+++ /branches/bleeding_edge/src/arm64/stub-cache-arm64.cc Tue Jul 29
16:07:34 2014 UTC
@@ -1106,8 +1106,8 @@
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
- ExternalReference store_ic_property =
- ExternalReference(IC_Utility(IC::kStoreInterceptorProperty),
isolate());
+ ExternalReference store_ic_property = ExternalReference(
+ IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
@@ -1294,7 +1294,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
MapHandleList* receiver_maps, CodeHandleList* handler_stubs,
MapHandleList* transitioned_maps) {
Label miss;
@@ -1329,7 +1329,7 @@
#undef __
#define __ ACCESS_MASM(masm)
-void IndexedHandlerCompiler::GenerateLoadDictionaryElement(
+void ElementHandlerCompiler::GenerateLoadDictionaryElement(
MacroAssembler* masm) {
// The return address is in lr.
Label slow, miss;
=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Thu Jul 24 12:11:30
2014 UTC
+++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Tue Jul 29 16:07:34
2014 UTC
@@ -539,7 +539,7 @@
template <>
-HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
+HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() {
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(KeyedLoadIC::kReceiverIndex),
GetParameter(KeyedLoadIC::kNameIndex),
@@ -553,7 +553,7 @@
}
-Handle<Code> KeyedLoadFastElementStub::GenerateCode() {
+Handle<Code> LoadFastElementStub::GenerateCode() {
return DoGenerateCode(this);
}
@@ -605,7 +605,7 @@
template <>
-HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
+HValue* CodeStubGraphBuilder<StoreFastElementStub>::BuildCodeStub() {
BuildUncheckedMonomorphicElementAccess(
GetParameter(StoreIC::kReceiverIndex),
GetParameter(StoreIC::kNameIndex),
@@ -617,7 +617,7 @@
}
-Handle<Code> KeyedStoreFastElementStub::GenerateCode() {
+Handle<Code> StoreFastElementStub::GenerateCode() {
return DoGenerateCode(this);
}
@@ -1378,8 +1378,8 @@
}
-template<>
-HValue*
CodeStubGraphBuilder<KeyedLoadDictionaryElementStub>::BuildCodeStub() {
+template <>
+HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() {
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
@@ -1393,7 +1393,7 @@
}
-Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode() {
+Handle<Code> LoadDictionaryElementStub::GenerateCode() {
return DoGenerateCode(this);
}
@@ -1417,12 +1417,11 @@
template <>
-class CodeStubGraphBuilder<KeyedLoadGenericElementStub>
- : public CodeStubGraphBuilderBase {
+class CodeStubGraphBuilder<KeyedLoadGenericStub>
+ : public CodeStubGraphBuilderBase {
public:
- CodeStubGraphBuilder(Isolate* isolate,
- KeyedLoadGenericElementStub* stub)
- : CodeStubGraphBuilderBase(isolate, stub) {}
+ CodeStubGraphBuilder(Isolate* isolate, KeyedLoadGenericStub* stub)
+ : CodeStubGraphBuilderBase(isolate, stub) {}
protected:
virtual HValue* BuildCodeStub();
@@ -1445,16 +1444,14 @@
HValue* bit_field2,
ElementsKind kind);
- KeyedLoadGenericElementStub* casted_stub() {
- return static_cast<KeyedLoadGenericElementStub*>(stub());
+ KeyedLoadGenericStub* casted_stub() {
+ return static_cast<KeyedLoadGenericStub*>(stub());
}
};
-void CodeStubGraphBuilder<
- KeyedLoadGenericElementStub>::BuildElementsKindLimitCheck(
- HGraphBuilder::IfBuilder* if_builder,
- HValue* bit_field2,
+void
CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildElementsKindLimitCheck(
+ HGraphBuilder::IfBuilder* if_builder, HValue* bit_field2,
ElementsKind kind) {
ElementsKind next_kind = static_cast<ElementsKind>(kind + 1);
HValue* kind_limit = Add<HConstant>(
@@ -1465,13 +1462,9 @@
}
-void
CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildFastElementLoad(
- HGraphBuilder::IfBuilder* if_builder,
- HValue* receiver,
- HValue* key,
- HValue* instance_type,
- HValue* bit_field2,
- ElementsKind kind) {
+void CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildFastElementLoad(
+ HGraphBuilder::IfBuilder* if_builder, HValue* receiver, HValue* key,
+ HValue* instance_type, HValue* bit_field2, ElementsKind kind) {
ASSERT(!IsExternalArrayElementsKind(kind));
BuildElementsKindLimitCheck(if_builder, bit_field2, kind);
@@ -1493,14 +1486,9 @@
}
-void CodeStubGraphBuilder<
- KeyedLoadGenericElementStub>::BuildExternalElementLoad(
- HGraphBuilder::IfBuilder* if_builder,
- HValue* receiver,
- HValue* key,
- HValue* instance_type,
- HValue* bit_field2,
- ElementsKind kind) {
+void CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildExternalElementLoad(
+ HGraphBuilder::IfBuilder* if_builder, HValue* receiver, HValue* key,
+ HValue* instance_type, HValue* bit_field2, ElementsKind kind) {
ASSERT(IsExternalArrayElementsKind(kind));
BuildElementsKindLimitCheck(if_builder, bit_field2, kind);
@@ -1512,7 +1500,7 @@
}
-HValue* CodeStubGraphBuilder<KeyedLoadGenericElementStub>::BuildCodeStub()
{
+HValue* CodeStubGraphBuilder<KeyedLoadGenericStub>::BuildCodeStub() {
HValue* receiver = GetParameter(KeyedLoadIC::kReceiverIndex);
HValue* key = GetParameter(KeyedLoadIC::kNameIndex);
@@ -1569,7 +1557,7 @@
BuildElementsKindLimitCheck(&kind_if, bit_field2,
SLOPPY_ARGUMENTS_ELEMENTS);
// Non-strict elements are not handled.
- Add<HDeoptimize>("non-strict elements in KeyedLoadGenericElementStub",
+ Add<HDeoptimize>("non-strict elements in KeyedLoadGenericStub",
Deoptimizer::EAGER);
Push(graph()->GetConstant0());
@@ -1609,7 +1597,7 @@
BuildExternalElementLoad(&kind_if, receiver, key, instance_type,
bit_field2,
EXTERNAL_UINT8_CLAMPED_ELEMENTS);
- kind_if.ElseDeopt("ElementsKind unhandled in
KeyedLoadGenericElementStub");
+ kind_if.ElseDeopt("ElementsKind unhandled in KeyedLoadGenericStub");
kind_if.End();
}
@@ -1730,7 +1718,7 @@
}
-Handle<Code> KeyedLoadGenericElementStub::GenerateCode() {
+Handle<Code> KeyedLoadGenericStub::GenerateCode() {
return DoGenerateCode(this);
}
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc Fri Jul 25 17:50:53 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.cc Tue Jul 29 16:07:34 2014 UTC
@@ -585,7 +585,7 @@
}
-void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
+void LoadFastElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { InterfaceDescriptor::ContextRegister(),
LoadIC::ReceiverRegister(),
@@ -596,7 +596,7 @@
}
-void KeyedLoadDictionaryElementStub::InitializeInterfaceDescriptor(
+void LoadDictionaryElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { InterfaceDescriptor::ContextRegister(),
LoadIC::ReceiverRegister(),
@@ -607,7 +607,7 @@
}
-void KeyedLoadGenericElementStub::InitializeInterfaceDescriptor(
+void KeyedLoadGenericStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { InterfaceDescriptor::ContextRegister(),
LoadIC::ReceiverRegister(),
@@ -636,7 +636,7 @@
}
-void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
+void StoreFastElementStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { InterfaceDescriptor::ContextRegister(),
KeyedStoreIC::ReceiverRegister(),
@@ -671,9 +671,8 @@
}
-void KeyedLoadDictionaryElementPlatformStub::Generate(
- MacroAssembler* masm) {
- IndexedHandlerCompiler::GenerateLoadDictionaryElement(masm);
+void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
+ ElementHandlerCompiler::GenerateLoadDictionaryElement(masm);
}
@@ -683,7 +682,7 @@
}
-void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
+void StoreElementStub::Generate(MacroAssembler* masm) {
switch (elements_kind_) {
case FAST_ELEMENTS:
case FAST_HOLEY_ELEMENTS:
@@ -700,7 +699,7 @@
UNREACHABLE();
break;
case DICTIONARY_ELEMENTS:
- IndexedHandlerCompiler::GenerateStoreDictionaryElement(masm);
+ ElementHandlerCompiler::GenerateStoreDictionaryElement(masm);
break;
case SLOPPY_ARGUMENTS_ELEMENTS:
UNREACHABLE();
@@ -941,8 +940,8 @@
// static
-void KeyedLoadGenericElementStub::InstallDescriptors(Isolate* isolate) {
- KeyedLoadGenericElementStub stub(isolate);
+void KeyedLoadGenericStub::InstallDescriptors(Isolate* isolate) {
+ KeyedLoadGenericStub stub(isolate);
InstallDescriptor(isolate, &stub);
}
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Fri Jul 25 17:50:53 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h Tue Jul 29 16:07:34 2014 UTC
@@ -52,7 +52,7 @@
V(DoubleToI) \
V(CEntry) \
V(JSEntry) \
- V(KeyedLoadElement) \
+ V(LoadElement) \
V(KeyedLoadGeneric) \
V(ArrayNoArgumentConstructor) \
V(ArraySingleArgumentConstructor) \
@@ -60,7 +60,7 @@
V(InternalArrayNoArgumentConstructor) \
V(InternalArraySingleArgumentConstructor) \
V(InternalArrayNArgumentsConstructor) \
- V(KeyedStoreElement) \
+ V(StoreElement) \
V(DebuggerStatement) \
V(NameDictionaryLookup) \
V(ElementsTransitionAndStore) \
@@ -1843,9 +1843,9 @@
};
-class KeyedLoadDictionaryElementStub : public HydrogenCodeStub {
+class LoadDictionaryElementStub : public HydrogenCodeStub {
public:
- explicit KeyedLoadDictionaryElementStub(Isolate* isolate)
+ explicit LoadDictionaryElementStub(Isolate* isolate)
: HydrogenCodeStub(isolate) {}
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
@@ -1854,32 +1854,31 @@
CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
private:
- Major MajorKey() const { return KeyedLoadElement; }
+ Major MajorKey() const { return LoadElement; }
int NotMissMinorKey() const { return DICTIONARY_ELEMENTS; }
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub);
+ DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementStub);
};
-class KeyedLoadDictionaryElementPlatformStub : public PlatformCodeStub {
+class LoadDictionaryElementPlatformStub : public PlatformCodeStub {
public:
- explicit KeyedLoadDictionaryElementPlatformStub(Isolate* isolate)
+ explicit LoadDictionaryElementPlatformStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
void Generate(MacroAssembler* masm);
private:
- Major MajorKey() const { return KeyedLoadElement; }
+ Major MajorKey() const { return LoadElement; }
int MinorKey() const { return DICTIONARY_ELEMENTS; }
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementPlatformStub);
+ DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementPlatformStub);
};
-class KeyedLoadGenericElementStub : public HydrogenCodeStub {
+class KeyedLoadGenericStub : public HydrogenCodeStub {
public:
- explicit KeyedLoadGenericElementStub(Isolate *isolate)
- : HydrogenCodeStub(isolate) {}
+ explicit KeyedLoadGenericStub(Isolate* isolate) :
HydrogenCodeStub(isolate) {}
virtual Handle<Code> GenerateCode() V8_OVERRIDE;
@@ -1895,7 +1894,7 @@
Major MajorKey() const { return KeyedLoadGeneric; }
int NotMissMinorKey() const { return 0; }
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericElementStub);
+ DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericStub);
};
@@ -1966,11 +1965,10 @@
};
-class KeyedLoadFastElementStub : public HydrogenCodeStub {
+class LoadFastElementStub : public HydrogenCodeStub {
public:
- KeyedLoadFastElementStub(Isolate* isolate,
- bool is_js_array,
- ElementsKind elements_kind)
+ LoadFastElementStub(Isolate* isolate, bool is_js_array,
+ ElementsKind elements_kind)
: HydrogenCodeStub(isolate) {
bit_field_ = ElementsKindBits::encode(elements_kind) |
IsJSArrayBits::encode(is_js_array);
@@ -1994,19 +1992,17 @@
class IsJSArrayBits: public BitField<bool, 8, 1> {};
uint32_t bit_field_;
- Major MajorKey() const { return KeyedLoadElement; }
+ Major MajorKey() const { return LoadElement; }
int NotMissMinorKey() const { return bit_field_; }
- DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub);
+ DISALLOW_COPY_AND_ASSIGN(LoadFastElementStub);
};
-class KeyedStoreFastElementStub : public HydrogenCodeStub {
+class StoreFastElementStub : public HydrogenCodeStub {
public:
- KeyedStoreFastElementStub(Isolate* isolate,
- bool is_js_array,
- ElementsKind elements_kind,
- KeyedAccessStoreMode mode)
+ StoreFastElementStub(Isolate* isolate, bool is_js_array,
+ ElementsKind elements_kind, KeyedAccessStoreMode
mode)
: HydrogenCodeStub(isolate) {
bit_field_ = ElementsKindBits::encode(elements_kind) |
IsJSArrayBits::encode(is_js_array) |
@@ -2036,10 +2032,10 @@
class IsJSArrayBits: public BitField<bool, 12, 1> {};
uint32_t bit_field_;
- Major MajorKey() const { return KeyedStoreElement; }
+ Major MajorKey() const { return StoreElement; }
int NotMissMinorKey() const { return bit_field_; }
- DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub);
+ DISALLOW_COPY_AND_ASSIGN(StoreFastElementStub);
};
@@ -2287,18 +2283,16 @@
};
-class KeyedStoreElementStub : public PlatformCodeStub {
+class StoreElementStub : public PlatformCodeStub {
public:
- KeyedStoreElementStub(Isolate* isolate,
- bool is_js_array,
- ElementsKind elements_kind,
- KeyedAccessStoreMode store_mode)
+ StoreElementStub(Isolate* isolate, bool is_js_array,
+ ElementsKind elements_kind, KeyedAccessStoreMode
store_mode)
: PlatformCodeStub(isolate),
is_js_array_(is_js_array),
elements_kind_(elements_kind),
- store_mode_(store_mode) { }
+ store_mode_(store_mode) {}
- Major MajorKey() const { return KeyedStoreElement; }
+ Major MajorKey() const { return StoreElement; }
int MinorKey() const {
return ElementsKindBits::encode(elements_kind_) |
IsJSArrayBits::encode(is_js_array_) |
@@ -2316,7 +2310,7 @@
ElementsKind elements_kind_;
KeyedAccessStoreMode store_mode_;
- DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub);
+ DISALLOW_COPY_AND_ASSIGN(StoreElementStub);
};
=======================================
--- /branches/bleeding_edge/src/heap.h Tue Jul 29 11:42:59 2014 UTC
+++ /branches/bleeding_edge/src/heap.h Tue Jul 29 16:07:34 2014 UTC
@@ -267,96 +267,94 @@
V(foreign_map) \
V(neander_map)
-#define INTERNALIZED_STRING_LIST(V) \
- V(Array_string, "Array") \
- V(Object_string, "Object") \
- V(proto_string, "__proto__") \
- V(arguments_string, "arguments") \
- V(Arguments_string, "Arguments") \
- V(call_string, "call") \
- V(apply_string, "apply") \
- V(caller_string, "caller") \
- V(boolean_string, "boolean") \
- V(Boolean_string, "Boolean") \
- V(callee_string, "callee") \
- V(constructor_string, "constructor") \
- V(dot_result_string, ".result") \
- V(dot_for_string, ".for.") \
- V(eval_string, "eval") \
- V(empty_string, "") \
- V(function_string, "function") \
- V(length_string, "length") \
- V(name_string, "name") \
- V(null_string, "null") \
- V(number_string, "number") \
- V(Number_string, "Number") \
- V(nan_string, "NaN") \
- V(RegExp_string, "RegExp") \
- V(source_string, "source") \
- V(source_url_string, "source_url") \
- V(source_mapping_url_string, "source_mapping_url") \
- V(global_string, "global") \
- V(ignore_case_string, "ignoreCase") \
- V(multiline_string, "multiline") \
- V(input_string, "input") \
- V(index_string, "index") \
- V(last_index_string, "lastIndex") \
- V(object_string, "object") \
- V(literals_string, "literals") \
- V(prototype_string, "prototype") \
- V(string_string, "string") \
- V(String_string, "String") \
- V(symbol_string, "symbol") \
- V(Symbol_string, "Symbol") \
- V(for_string, "for") \
- V(for_api_string, "for_api") \
- V(for_intern_string, "for_intern") \
- V(private_api_string, "private_api") \
- V(private_intern_string, "private_intern") \
- V(Date_string, "Date") \
- V(to_string_string, "toString") \
- V(char_at_string, "CharAt") \
- V(undefined_string, "undefined") \
- V(value_of_string, "valueOf") \
- V(stack_string, "stack") \
- V(toJSON_string, "toJSON") \
- V(InitializeVarGlobal_string, "InitializeVarGlobal") \
- V(InitializeConstGlobal_string, "InitializeConstGlobal") \
- V(KeyedLoadElementMonomorphic_string, \
- "KeyedLoadElementMonomorphic") \
- V(KeyedStoreElementMonomorphic_string, \
- "KeyedStoreElementMonomorphic") \
- V(stack_overflow_string, "kStackOverflowBoilerplate") \
- V(illegal_access_string, "illegal access") \
- V(get_string, "get") \
- V(set_string, "set") \
- V(map_field_string, "%map") \
- V(elements_field_string, "%elements") \
- V(length_field_string, "%length") \
- V(cell_value_string, "%cell_value") \
- V(function_class_string, "Function") \
- V(illegal_argument_string, "illegal argument") \
- V(space_string, " ") \
- V(exec_string, "exec") \
- V(zero_string, "0") \
- V(global_eval_string, "GlobalEval") \
- V(identity_hash_string, "v8::IdentityHash") \
- V(closure_string, "(closure)") \
- V(dot_string, ".") \
- V(compare_ic_string, "==") \
- V(strict_compare_ic_string, "===") \
- V(infinity_string, "Infinity") \
- V(minus_infinity_string, "-Infinity") \
- V(query_colon_string, "(?:)") \
- V(Generator_string, "Generator") \
- V(throw_string, "throw") \
- V(done_string, "done") \
- V(value_string, "value") \
- V(next_string, "next") \
- V(byte_length_string, "byteLength") \
- V(byte_offset_string, "byteOffset") \
- V(buffer_string, "buffer") \
- V(intl_initialized_marker_string, "v8::intl_initialized_marker") \
+#define INTERNALIZED_STRING_LIST(V) \
+ V(Array_string, "Array") \
+ V(Object_string, "Object") \
+ V(proto_string, "__proto__") \
+ V(arguments_string, "arguments") \
+ V(Arguments_string, "Arguments") \
+ V(call_string, "call") \
+ V(apply_string, "apply") \
+ V(caller_string, "caller") \
+ V(boolean_string, "boolean") \
+ V(Boolean_string, "Boolean") \
+ V(callee_string, "callee") \
+ V(constructor_string, "constructor") \
+ V(dot_result_string, ".result") \
+ V(dot_for_string, ".for.") \
+ V(eval_string, "eval") \
+ V(empty_string, "") \
+ V(function_string, "function") \
+ V(length_string, "length") \
+ V(name_string, "name") \
+ V(null_string, "null") \
+ V(number_string, "number") \
+ V(Number_string, "Number") \
+ V(nan_string, "NaN") \
+ V(RegExp_string, "RegExp") \
+ V(source_string, "source") \
+ V(source_url_string, "source_url") \
+ V(source_mapping_url_string, "source_mapping_url") \
+ V(global_string, "global") \
+ V(ignore_case_string, "ignoreCase") \
+ V(multiline_string, "multiline") \
+ V(input_string, "input") \
+ V(index_string, "index") \
+ V(last_index_string, "lastIndex") \
+ V(object_string, "object") \
+ V(literals_string, "literals") \
+ V(prototype_string, "prototype") \
+ V(string_string, "string") \
+ V(String_string, "String") \
+ V(symbol_string, "symbol") \
+ V(Symbol_string, "Symbol") \
+ V(for_string, "for") \
+ V(for_api_string, "for_api") \
+ V(for_intern_string, "for_intern") \
+ V(private_api_string, "private_api") \
+ V(private_intern_string, "private_intern") \
+ V(Date_string, "Date") \
+ V(to_string_string, "toString") \
+ V(char_at_string, "CharAt") \
+ V(undefined_string, "undefined") \
+ V(value_of_string, "valueOf") \
+ V(stack_string, "stack") \
+ V(toJSON_string, "toJSON") \
+ V(InitializeVarGlobal_string, "InitializeVarGlobal") \
+ V(InitializeConstGlobal_string, "InitializeConstGlobal") \
+ V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \
+ V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic") \
+ V(stack_overflow_string, "kStackOverflowBoilerplate") \
+ V(illegal_access_string, "illegal access") \
+ V(get_string, "get") \
+ V(set_string, "set") \
+ V(map_field_string, "%map") \
+ V(elements_field_string, "%elements") \
+ V(length_field_string, "%length") \
+ V(cell_value_string, "%cell_value") \
+ V(function_class_string, "Function") \
+ V(illegal_argument_string, "illegal argument") \
+ V(space_string, " ") \
+ V(exec_string, "exec") \
+ V(zero_string, "0") \
+ V(global_eval_string, "GlobalEval") \
+ V(identity_hash_string, "v8::IdentityHash") \
+ V(closure_string, "(closure)") \
+ V(dot_string, ".") \
+ V(compare_ic_string, "==") \
+ V(strict_compare_ic_string, "===") \
+ V(infinity_string, "Infinity") \
+ V(minus_infinity_string, "-Infinity") \
+ V(query_colon_string, "(?:)") \
+ V(Generator_string, "Generator") \
+ V(throw_string, "throw") \
+ V(done_string, "done") \
+ V(value_string, "value") \
+ V(next_string, "next") \
+ V(byte_length_string, "byteLength") \
+ V(byte_offset_string, "byteOffset") \
+ V(buffer_string, "buffer") \
+ V(intl_initialized_marker_string, "v8::intl_initialized_marker") \
V(intl_impl_object_string, "v8::intl_object")
// Forward declarations.
=======================================
--- /branches/bleeding_edge/src/ia32/ic-ia32.cc Mon Jul 21 11:19:56 2014 UTC
+++ /branches/bleeding_edge/src/ia32/ic-ia32.cc Tue Jul 29 16:07:34 2014 UTC
@@ -579,9 +579,8 @@
__ push(scratch); // return address
// Perform tail call to the entry.
- ExternalReference ref =
- ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
- masm->isolate());
+ ExternalReference ref = ExternalReference(
+ IC_Utility(kLoadElementWithInterceptor), masm->isolate());
__ TailCallExternalReference(ref, 2, 1);
__ bind(&slow);
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Tue Jul 29
14:38:39 2014 UTC
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Tue Jul 29
16:07:34 2014 UTC
@@ -1280,7 +1280,7 @@
// Compute the hash code from the untagged key. This must be kept in sync
with
-// ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
+// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in
// code-stub-hydrogen.cc
//
// Note: r0 will contain hash code
=======================================
--- /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Tue Jul 29 16:04:07
2014 UTC
+++ /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Tue Jul 29 16:07:34
2014 UTC
@@ -1123,8 +1123,8 @@
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
- ExternalReference store_ic_property =
- ExternalReference(IC_Utility(IC::kStoreInterceptorProperty),
isolate());
+ ExternalReference store_ic_property = ExternalReference(
+ IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
@@ -1146,7 +1146,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
MapHandleList* receiver_maps, CodeHandleList* handler_stubs,
MapHandleList* transitioned_maps) {
Label miss;
@@ -1344,7 +1344,7 @@
#define __ ACCESS_MASM(masm)
-void IndexedHandlerCompiler::GenerateLoadDictionaryElement(
+void ElementHandlerCompiler::GenerateLoadDictionaryElement(
MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- ecx : key
=======================================
--- /branches/bleeding_edge/src/ic.cc Tue Jul 29 16:04:07 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc Tue Jul 29 16:07:34 2014 UTC
@@ -482,8 +482,8 @@
Code* target,
ConstantPoolArray* constant_pool) {
if (IsCleared(target)) return;
- Code* code = PropertyICCompiler::FindPreMonomorphicIC(
- isolate, Code::LOAD_IC, target->extra_ic_state());
+ Code* code = PropertyICCompiler::FindPreMonomorphic(isolate,
Code::LOAD_IC,
+
target->extra_ic_state());
SetTargetAtAddress(address, code, constant_pool);
}
@@ -493,8 +493,8 @@
Code* target,
ConstantPoolArray* constant_pool) {
if (IsCleared(target)) return;
- Code* code = PropertyICCompiler::FindPreMonomorphicIC(
- isolate, Code::STORE_IC, target->extra_ic_state());
+ Code* code = PropertyICCompiler::FindPreMonomorphic(isolate,
Code::STORE_IC,
+
target->extra_ic_state());
SetTargetAtAddress(address, code, constant_pool);
}
@@ -529,7 +529,7 @@
// static
Handle<Code> KeyedLoadIC::generic_stub(Isolate* isolate) {
if (FLAG_compiled_keyed_generic_loads) {
- return KeyedLoadGenericElementStub(isolate).GetCode();
+ return KeyedLoadGenericStub(isolate).GetCode();
} else {
return isolate->builtins()->KeyedLoadIC_Generic();
}
@@ -660,8 +660,8 @@
if (number_of_valid_types > 1 && target()->is_keyed_stub()) return false;
Handle<Code> ic;
if (number_of_valid_types == 1) {
- ic = PropertyICCompiler::ComputeMonomorphicIC(kind(), name, type, code,
- extra_ic_state());
+ ic = PropertyICCompiler::ComputeMonomorphic(kind(), name, type, code,
+ extra_ic_state());
} else {
if (handler_to_overwrite >= 0) {
handlers.Set(handler_to_overwrite, code);
@@ -672,9 +672,9 @@
types.Add(type);
handlers.Add(code);
}
- ic = PropertyICCompiler::ComputePolymorphicIC(kind(), &types,
&handlers,
- number_of_valid_types,
name,
- extra_ic_state());
+ ic = PropertyICCompiler::ComputePolymorphic(kind(), &types, &handlers,
+ number_of_valid_types,
name,
+ extra_ic_state());
}
set_target(*ic);
return true;
@@ -725,7 +725,7 @@
void IC::UpdateMonomorphicIC(Handle<Code> handler, Handle<String> name) {
if (!handler->is_handler()) return set_target(*handler);
- Handle<Code> ic = PropertyICCompiler::ComputeMonomorphicIC(
+ Handle<Code> ic = PropertyICCompiler::ComputeMonomorphic(
kind(), name, receiver_type(), handler, extra_ic_state());
set_target(*ic);
}
@@ -1073,7 +1073,7 @@
TargetMaps(&target_receiver_maps);
}
if (target_receiver_maps.length() == 0) {
- return PropertyICCompiler::ComputeKeyedLoadElement(receiver_map);
+ return PropertyICCompiler::ComputeKeyedLoadMonomorphic(receiver_map);
}
// The first time a receiver is seen that is a transitioned version of
the
@@ -1087,7 +1087,7 @@
IsMoreGeneralElementsKindTransition(
target_receiver_maps.at(0)->elements_kind(),
receiver->GetElementsKind())) {
- return PropertyICCompiler::ComputeKeyedLoadElement(receiver_map);
+ return PropertyICCompiler::ComputeKeyedLoadMonomorphic(receiver_map);
}
ASSERT(state() != GENERIC);
@@ -1108,8 +1108,7 @@
return generic_stub();
}
- return PropertyICCompiler::ComputeLoadElementPolymorphic(
- &target_receiver_maps);
+ return
PropertyICCompiler::ComputeKeyedLoadPolymorphic(&target_receiver_maps);
}
@@ -1494,7 +1493,7 @@
Handle<Map> monomorphic_map =
ComputeTransitionedMap(receiver_map, store_mode);
store_mode = GetNonTransitioningStoreMode(store_mode);
- return PropertyICCompiler::ComputeKeyedStoreElement(
+ return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
monomorphic_map, strict_mode(), store_mode);
}
@@ -1519,7 +1518,7 @@
// if they at least come from the same origin for a transitioning
store,
// stay MONOMORPHIC and use the map for the most generic
ElementsKind.
store_mode = GetNonTransitioningStoreMode(store_mode);
- return PropertyICCompiler::ComputeKeyedStoreElement(
+ return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
transitioned_receiver_map, strict_mode(), store_mode);
} else if (*previous_receiver_map == receiver->map() &&
old_store_mode == STANDARD_STORE &&
@@ -1529,7 +1528,7 @@
// A "normal" IC that handles stores can switch to a version that can
// grow at the end of the array, handle OOB accesses or copy COW
arrays
// and still stay MONOMORPHIC.
- return PropertyICCompiler::ComputeKeyedStoreElement(
+ return PropertyICCompiler::ComputeKeyedStoreMonomorphic(
receiver_map, strict_mode(), store_mode);
}
}
@@ -1591,7 +1590,7 @@
}
}
- return PropertyICCompiler::ComputeStoreElementPolymorphic(
+ return PropertyICCompiler::ComputeKeyedStorePolymorphic(
&target_receiver_maps, store_mode, strict_mode());
}
=======================================
--- /branches/bleeding_edge/src/ic.h Wed Jul 23 12:24:11 2014 UTC
+++ /branches/bleeding_edge/src/ic.h Tue Jul 29 16:07:34 2014 UTC
@@ -16,27 +16,27 @@
// IC_UTIL_LIST defines all utility functions called from generated
// inline caching code. The argument for the macro, ICU, is the function
name.
-#define IC_UTIL_LIST(ICU) \
- ICU(LoadIC_Miss) \
- ICU(KeyedLoadIC_Miss) \
- ICU(CallIC_Miss) \
- ICU(CallIC_Customization_Miss) \
- ICU(StoreIC_Miss) \
- ICU(StoreIC_ArrayLength) \
- ICU(StoreIC_Slow) \
- ICU(SharedStoreIC_ExtendStorage) \
- ICU(KeyedStoreIC_Miss) \
- ICU(KeyedStoreIC_Slow) \
- /* Utilities for IC stubs. */ \
- ICU(StoreCallbackProperty) \
- ICU(LoadPropertyWithInterceptorOnly) \
- ICU(LoadPropertyWithInterceptor) \
- ICU(KeyedLoadPropertyWithInterceptor) \
- ICU(StoreInterceptorProperty) \
- ICU(CompareIC_Miss) \
- ICU(BinaryOpIC_Miss) \
- ICU(CompareNilIC_Miss) \
- ICU(Unreachable) \
+#define IC_UTIL_LIST(ICU) \
+ ICU(LoadIC_Miss) \
+ ICU(KeyedLoadIC_Miss) \
+ ICU(CallIC_Miss) \
+ ICU(CallIC_Customization_Miss) \
+ ICU(StoreIC_Miss) \
+ ICU(StoreIC_ArrayLength) \
+ ICU(StoreIC_Slow) \
+ ICU(SharedStoreIC_ExtendStorage) \
+ ICU(KeyedStoreIC_Miss) \
+ ICU(KeyedStoreIC_Slow) \
+ /* Utilities for IC stubs. */ \
+ ICU(StoreCallbackProperty) \
+ ICU(LoadPropertyWithInterceptorOnly) \
+ ICU(LoadPropertyWithInterceptor) \
+ ICU(LoadElementWithInterceptor) \
+ ICU(StorePropertyWithInterceptor) \
+ ICU(CompareIC_Miss) \
+ ICU(BinaryOpIC_Miss) \
+ ICU(CompareNilIC_Miss) \
+ ICU(Unreachable) \
ICU(ToBooleanIC_Miss)
//
// IC is the base class for LoadIC, StoreIC, KeyedLoadIC, and KeyedStoreIC.
=======================================
--- /branches/bleeding_edge/src/isolate.cc Fri Jul 18 13:28:12 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc Tue Jul 29 16:07:34 2014 UTC
@@ -2000,7 +2000,7 @@
NumberToStringStub::InstallDescriptors(this);
StringAddStub::InstallDescriptors(this);
RegExpConstructResultStub::InstallDescriptors(this);
- KeyedLoadGenericElementStub::InstallDescriptors(this);
+ KeyedLoadGenericStub::InstallDescriptors(this);
}
CallDescriptors::InitializeForIsolate(this);
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Tue Jul 29 16:04:07 2014 UTC
+++ /branches/bleeding_edge/src/stub-cache.cc Tue Jul 29 16:07:34 2014 UTC
@@ -129,7 +129,7 @@
}
-Handle<Code> PropertyICCompiler::ComputeMonomorphicIC(
+Handle<Code> PropertyICCompiler::ComputeMonomorphic(
Code::Kind kind, Handle<Name> name, Handle<HeapType> type,
Handle<Code> handler, ExtraICState extra_ic_state) {
CacheHolderFlag flag;
@@ -205,11 +205,11 @@
}
-Handle<Code> PropertyICCompiler::ComputeKeyedLoadElement(
+Handle<Code> PropertyICCompiler::ComputeKeyedLoadMonomorphic(
Handle<Map> receiver_map) {
Isolate* isolate = receiver_map->GetIsolate();
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC);
- Handle<Name> name =
isolate->factory()->KeyedLoadElementMonomorphic_string();
+ Handle<Name> name = isolate->factory()->KeyedLoadMonomorphic_string();
Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags),
isolate);
if (probe->IsCode()) return Handle<Code>::cast(probe);
@@ -219,13 +219,13 @@
if (receiver_map->has_fast_elements() ||
receiver_map->has_external_array_elements() ||
receiver_map->has_fixed_typed_array_elements()) {
- stub = KeyedLoadFastElementStub(
- isolate, receiver_map->instance_type() == JS_ARRAY_TYPE,
- elements_kind).GetCode();
+ stub = LoadFastElementStub(isolate,
+ receiver_map->instance_type() ==
JS_ARRAY_TYPE,
+ elements_kind).GetCode();
} else {
stub = FLAG_compiled_keyed_dictionary_loads
- ? KeyedLoadDictionaryElementStub(isolate).GetCode()
- : KeyedLoadDictionaryElementPlatformStub(isolate).GetCode();
+ ? LoadDictionaryElementStub(isolate).GetCode()
+ : LoadDictionaryElementPlatformStub(isolate).GetCode();
}
PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
Handle<Code> code =
@@ -237,7 +237,7 @@
}
-Handle<Code> PropertyICCompiler::ComputeKeyedStoreElement(
+Handle<Code> PropertyICCompiler::ComputeKeyedStoreMonomorphic(
Handle<Map> receiver_map, StrictMode strict_mode,
KeyedAccessStoreMode store_mode) {
Isolate* isolate = receiver_map->GetIsolate();
@@ -251,14 +251,13 @@
store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
store_mode == STORE_NO_TRANSITION_HANDLE_COW);
- Handle<String> name =
- isolate->factory()->KeyedStoreElementMonomorphic_string();
+ Handle<String> name = isolate->factory()->KeyedStoreMonomorphic_string();
Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags),
isolate);
if (probe->IsCode()) return Handle<Code>::cast(probe);
PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state);
Handle<Code> code =
- compiler.CompileIndexedStoreMonomorphic(receiver_map, store_mode);
+ compiler.CompileKeyedStoreMonomorphic(receiver_map, store_mode);
Map::UpdateCodeCache(receiver_map, name, code);
ASSERT(KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state())
@@ -278,9 +277,8 @@
}
-Code* PropertyICCompiler::FindPreMonomorphicIC(Isolate* isolate,
- Code::Kind kind,
- ExtraICState state) {
+Code* PropertyICCompiler::FindPreMonomorphic(Isolate* isolate, Code::Kind
kind,
+ ExtraICState state) {
Code::Flags flags = Code::ComputeFlags(kind, PREMONOMORPHIC, state);
UnseededNumberDictionary* dictionary =
isolate->heap()->non_monomorphic_cache();
@@ -369,7 +367,7 @@
// TODO(verwaest): Change this method so it takes in a TypeHandleList.
-Handle<Code> PropertyICCompiler::ComputeLoadElementPolymorphic(
+Handle<Code> PropertyICCompiler::ComputeKeyedLoadPolymorphic(
MapHandleList* receiver_maps) {
Isolate* isolate = receiver_maps->at(0)->GetIsolate();
Code::Flags flags = Code::ComputeFlags(Code::KEYED_LOAD_IC, POLYMORPHIC);
@@ -383,7 +381,7 @@
types.Add(HeapType::Class(receiver_maps->at(i), isolate));
}
CodeHandleList handlers(receiver_maps->length());
- IndexedHandlerCompiler compiler(isolate);
+ ElementHandlerCompiler compiler(isolate);
compiler.CompileElementHandlers(receiver_maps, &handlers);
PropertyICCompiler ic_compiler(isolate, Code::KEYED_LOAD_IC);
Handle<Code> code = ic_compiler.CompilePolymorphic(
@@ -397,7 +395,7 @@
}
-Handle<Code> PropertyICCompiler::ComputePolymorphicIC(
+Handle<Code> PropertyICCompiler::ComputePolymorphic(
Code::Kind kind, TypeHandleList* types, CodeHandleList* handlers,
int valid_types, Handle<Name> name, ExtraICState extra_ic_state) {
Handle<Code> handler = handlers->at(0);
@@ -408,7 +406,7 @@
}
-Handle<Code> PropertyICCompiler::ComputeStoreElementPolymorphic(
+Handle<Code> PropertyICCompiler::ComputeKeyedStorePolymorphic(
MapHandleList* receiver_maps, KeyedAccessStoreMode store_mode,
StrictMode strict_mode) {
Isolate* isolate = receiver_maps->at(0)->GetIsolate();
@@ -427,7 +425,7 @@
PropertyICCompiler compiler(isolate, Code::KEYED_STORE_IC, extra_state);
Handle<Code> code =
- compiler.CompileIndexedStorePolymorphic(receiver_maps, store_mode);
+ compiler.CompileKeyedStorePolymorphic(receiver_maps, store_mode);
PolymorphicCodeCache::Update(cache, receiver_maps, flags, code);
return code;
}
@@ -609,7 +607,7 @@
}
-RUNTIME_FUNCTION(StoreInterceptorProperty) {
+RUNTIME_FUNCTION(StorePropertyWithInterceptor) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
@@ -634,7 +632,7 @@
}
-RUNTIME_FUNCTION(KeyedLoadPropertyWithInterceptor) {
+RUNTIME_FUNCTION(LoadElementWithInterceptor) {
HandleScope scope(isolate);
Handle<JSObject> receiver = args.at<JSObject>(0);
ASSERT(args.smi_at(1) >= 0);
@@ -1088,7 +1086,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStoreMonomorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStoreMonomorphic(
Handle<Map> receiver_map, KeyedAccessStoreMode store_mode) {
ElementsKind elements_kind = receiver_map->elements_kind();
bool is_jsarray = receiver_map->instance_type() == JS_ARRAY_TYPE;
@@ -1096,11 +1094,11 @@
if (receiver_map->has_fast_elements() ||
receiver_map->has_external_array_elements() ||
receiver_map->has_fixed_typed_array_elements()) {
- stub = KeyedStoreFastElementStub(isolate(), is_jsarray, elements_kind,
- store_mode).GetCode();
+ stub = StoreFastElementStub(isolate(), is_jsarray, elements_kind,
+ store_mode).GetCode();
} else {
- stub = KeyedStoreElementStub(isolate(), is_jsarray, elements_kind,
- store_mode).GetCode();
+ stub = StoreElementStub(isolate(), is_jsarray, elements_kind,
store_mode)
+ .GetCode();
}
__ DispatchMap(receiver(), scratch1(), receiver_map, stub, DO_SMI_CHECK);
@@ -1155,7 +1153,7 @@
}
-void IndexedHandlerCompiler::CompileElementHandlers(
+void ElementHandlerCompiler::CompileElementHandlers(
MapHandleList* receiver_maps, CodeHandleList* handlers) {
for (int i = 0; i < receiver_maps->length(); ++i) {
Handle<Map> receiver_map = receiver_maps->at(i);
@@ -1172,16 +1170,13 @@
if (IsFastElementsKind(elements_kind) ||
IsExternalArrayElementsKind(elements_kind) ||
IsFixedTypedArrayElementsKind(elements_kind)) {
- cached_stub =
- KeyedLoadFastElementStub(isolate(),
- is_js_array,
- elements_kind).GetCode();
+ cached_stub = LoadFastElementStub(isolate(), is_js_array,
elements_kind)
+ .GetCode();
} else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) {
cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments();
} else {
ASSERT(elements_kind == DICTIONARY_ELEMENTS);
- cached_stub =
- KeyedLoadDictionaryElementStub(isolate()).GetCode();
+ cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
}
}
@@ -1190,7 +1185,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
MapHandleList* receiver_maps, KeyedAccessStoreMode store_mode) {
// Collect MONOMORPHIC stubs for all |receiver_maps|.
CodeHandleList handlers(receiver_maps->length());
@@ -1219,13 +1214,11 @@
if (receiver_map->has_fast_elements() ||
receiver_map->has_external_array_elements() ||
receiver_map->has_fixed_typed_array_elements()) {
- cached_stub =
- KeyedStoreFastElementStub(isolate(), is_js_array,
elements_kind,
- store_mode).GetCode();
+ cached_stub = StoreFastElementStub(isolate(), is_js_array,
+ elements_kind,
store_mode).GetCode();
} else {
- cached_stub =
- KeyedStoreElementStub(isolate(), is_js_array, elements_kind,
- store_mode).GetCode();
+ cached_stub = StoreElementStub(isolate(), is_js_array,
elements_kind,
+ store_mode).GetCode();
}
}
ASSERT(!cached_stub.is_null());
@@ -1233,15 +1226,15 @@
transitioned_maps.Add(transitioned_map);
}
- Handle<Code> code = CompileIndexedStorePolymorphic(receiver_maps,
&handlers,
- &transitioned_maps);
+ Handle<Code> code = CompileKeyedStorePolymorphic(receiver_maps,
&handlers,
+ &transitioned_maps);
isolate()->counters()->keyed_store_polymorphic_stubs()->Increment();
PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, 0));
return code;
}
-void IndexedHandlerCompiler::GenerateStoreDictionaryElement(
+void ElementHandlerCompiler::GenerateStoreDictionaryElement(
MacroAssembler* masm) {
KeyedStoreIC::GenerateSlow(masm);
}
=======================================
--- /branches/bleeding_edge/src/stub-cache.h Tue Jul 29 16:04:07 2014 UTC
+++ /branches/bleeding_edge/src/stub-cache.h Tue Jul 29 16:07:34 2014 UTC
@@ -193,8 +193,8 @@
// Support functions for IC stubs for interceptors.
DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
-DECLARE_RUNTIME_FUNCTION(StoreInterceptorProperty);
-DECLARE_RUNTIME_FUNCTION(KeyedLoadPropertyWithInterceptor);
+DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
+DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER };
@@ -270,8 +270,8 @@
class PropertyICCompiler : public PropertyAccessCompiler {
public:
// Finds the Code object stored in the Heap::non_monomorphic_cache().
- static Code* FindPreMonomorphicIC(Isolate* isolate, Code::Kind kind,
- ExtraICState extra_ic_state);
+ static Code* FindPreMonomorphic(Isolate* isolate, Code::Kind kind,
+ ExtraICState extra_ic_state);
// Named
static Handle<Code> ComputeLoad(Isolate* isolate, InlineCacheState
ic_state,
@@ -279,23 +279,24 @@
static Handle<Code> ComputeStore(Isolate* isolate, InlineCacheState
ic_state,
ExtraICState extra_state);
- static Handle<Code> ComputeMonomorphicIC(Code::Kind kind, Handle<Name>
name,
- Handle<HeapType> type,
- Handle<Code> handler,
- ExtraICState extra_ic_state);
- static Handle<Code> ComputePolymorphicIC(
- Code::Kind kind, TypeHandleList* types, CodeHandleList* handlers,
- int number_of_valid_maps, Handle<Name> name, ExtraICState
extra_ic_state);
+ static Handle<Code> ComputeMonomorphic(Code::Kind kind, Handle<Name>
name,
+ Handle<HeapType> type,
+ Handle<Code> handler,
+ ExtraICState extra_ic_state);
+ static Handle<Code> ComputePolymorphic(Code::Kind kind, TypeHandleList*
types,
+ CodeHandleList* handlers,
+ int number_of_valid_maps,
+ Handle<Name> name,
+ ExtraICState extra_ic_state);
// Keyed
- static Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map);
+ static Handle<Code> ComputeKeyedLoadMonomorphic(Handle<Map>
receiver_map);
- static Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map,
- StrictMode strict_mode,
- KeyedAccessStoreMode
store_mode);
- static Handle<Code> ComputeLoadElementPolymorphic(
- MapHandleList* receiver_maps);
- static Handle<Code> ComputeStoreElementPolymorphic(
+ static Handle<Code> ComputeKeyedStoreMonomorphic(
+ Handle<Map> receiver_map, StrictMode strict_mode,
+ KeyedAccessStoreMode store_mode);
+ static Handle<Code> ComputeKeyedLoadPolymorphic(MapHandleList*
receiver_maps);
+ static Handle<Code> ComputeKeyedStorePolymorphic(
MapHandleList* receiver_maps, KeyedAccessStoreMode store_mode,
StrictMode strict_mode);
@@ -330,13 +331,13 @@
CodeHandleList* handlers, Handle<Name>
name,
Code::StubType type, IcCheckType check);
- Handle<Code> CompileIndexedStoreMonomorphic(Handle<Map> receiver_map,
- KeyedAccessStoreMode
store_mode);
- Handle<Code> CompileIndexedStorePolymorphic(MapHandleList* receiver_maps,
- KeyedAccessStoreMode
store_mode);
- Handle<Code> CompileIndexedStorePolymorphic(MapHandleList* receiver_maps,
- CodeHandleList*
handler_stubs,
- MapHandleList*
transitioned_maps);
+ Handle<Code> CompileKeyedStoreMonomorphic(Handle<Map> receiver_map,
+ KeyedAccessStoreMode
store_mode);
+ Handle<Code> CompileKeyedStorePolymorphic(MapHandleList* receiver_maps,
+ KeyedAccessStoreMode
store_mode);
+ Handle<Code> CompileKeyedStorePolymorphic(MapHandleList* receiver_maps,
+ CodeHandleList* handler_stubs,
+ MapHandleList*
transitioned_maps);
bool IncludesNumberType(TypeHandleList* types);
@@ -667,13 +668,13 @@
};
-class IndexedHandlerCompiler : public PropertyHandlerCompiler {
+class ElementHandlerCompiler : public PropertyHandlerCompiler {
public:
- explicit IndexedHandlerCompiler(Isolate* isolate)
+ explicit ElementHandlerCompiler(Isolate* isolate)
: PropertyHandlerCompiler(isolate, Code::KEYED_LOAD_IC,
kCacheOnReceiver) {}
- virtual ~IndexedHandlerCompiler() {}
+ virtual ~ElementHandlerCompiler() {}
void CompileElementHandlers(MapHandleList* receiver_maps,
CodeHandleList* handlers);
=======================================
--- /branches/bleeding_edge/src/x64/ic-x64.cc Mon Jul 21 11:19:56 2014 UTC
+++ /branches/bleeding_edge/src/x64/ic-x64.cc Tue Jul 29 16:07:34 2014 UTC
@@ -507,10 +507,9 @@
// Perform tail call to the entry.
__ TailCallExternalReference(
- ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
+ ExternalReference(IC_Utility(kLoadElementWithInterceptor),
masm->isolate()),
- 2,
- 1);
+ 2, 1);
__ bind(&slow);
GenerateMiss(masm);
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Tue Jul 29
14:38:39 2014 UTC
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Tue Jul 29
16:07:34 2014 UTC
@@ -4247,7 +4247,7 @@
// Compute the hash code from the untagged key. This must be kept in sync
with
-// ComputeIntegerHash in utils.h and KeyedLoadGenericElementStub in
+// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in
// code-stub-hydrogen.cc
void MacroAssembler::GetNumberHash(Register r0, Register scratch) {
// First of all we assign the hash seed to scratch.
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Tue Jul 29 16:04:07
2014 UTC
+++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Tue Jul 29 16:07:34
2014 UTC
@@ -1046,8 +1046,8 @@
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
- ExternalReference store_ic_property =
- ExternalReference(IC_Utility(IC::kStoreInterceptorProperty),
isolate());
+ ExternalReference store_ic_property = ExternalReference(
+ IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
@@ -1069,7 +1069,7 @@
}
-Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic(
+Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
MapHandleList* receiver_maps, CodeHandleList* handler_stubs,
MapHandleList* transitioned_maps) {
Label miss;
@@ -1279,7 +1279,7 @@
#define __ ACCESS_MASM(masm)
-void IndexedHandlerCompiler::GenerateLoadDictionaryElement(
+void ElementHandlerCompiler::GenerateLoadDictionaryElement(
MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- rcx : key
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.