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

Unified Diff: src/ia32/ic-ia32.cc

Issue 458813002: Prototype implementation of GET_OWN_PROPERTY intrinsic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/ic-ia32.cc
diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
index 62e845eb27eee964527d7aac84985fa3c6f79e0a..2128605cb56cbf603527c0fba0ea09e808c3b459 100644
--- a/src/ia32/ic-ia32.cc
+++ b/src/ia32/ic-ia32.cc
@@ -343,11 +343,12 @@ static Operand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
}
-void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
+void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm, ExtraICState extra_state) {
// The return address is on the stack.
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
+ PropertyLookupMode lookup_mode = GetPropertyLookupMode(extra_state);
Register receiver = ReceiverRegister();
Register key = NameRegister();
DCHECK(receiver.is(edx));
@@ -399,7 +400,11 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
__ bind(&slow);
// Slow case: jump to runtime.
__ IncrementCounter(counters->keyed_load_generic_slow(), 1);
- GenerateRuntimeGetProperty(masm);
+ if (lookup_mode == OWN_PROPERTY_LOOKUP) {
+ GenerateRuntimeGetOwnProperty(masm);
+ } else {
+ GenerateRuntimeGetProperty(masm);
+ }
__ bind(&check_name);
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
@@ -884,18 +889,20 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
}
-void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
- // The return address is on the stack.
- Register receiver = ReceiverRegister();
- Register name = NameRegister();
- DCHECK(receiver.is(edx));
- DCHECK(name.is(ecx));
+void LoadIC::GenerateMegamorphic(MacroAssembler* masm, ExtraICState extra_state) {
+ if (GetPropertyLookupMode(extra_state) == NORMAL_LOOKUP) {
+ // The return address is on the stack.
+ Register receiver = ReceiverRegister();
+ Register name = NameRegister();
+ DCHECK(receiver.is(edx));
+ DCHECK(name.is(ecx));
- // Probe the stub cache.
- Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
- Code::ComputeHandlerFlags(Code::LOAD_IC));
- masm->isolate()->stub_cache()->GenerateProbe(
- masm, flags, receiver, name, ebx, eax);
+ // Probe the stub cache.
+ Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
+ Code::ComputeHandlerFlags(Code::LOAD_IC));
+ masm->isolate()->stub_cache()->GenerateProbe(
+ masm, flags, receiver, name, ebx, eax);
+ }
// Cache miss: Jump to runtime.
GenerateMiss(masm);
@@ -955,6 +962,15 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
}
+void LoadIC::GenerateRuntimeGetOwnProperty(MacroAssembler* masm) {
+ // Return address is on the stack.
+ LoadIC_PushArgs(masm);
+
+ // Perform tail call to the entry.
+ __ TailCallRuntime(Runtime::kLoadOwnProperty, 2, 1);
+}
+
+
void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
// Return address is on the stack.
__ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1);
@@ -1004,6 +1020,15 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
}
+void KeyedLoadIC::GenerateRuntimeGetOwnProperty(MacroAssembler* masm) {
+ // Return address is on the stack.
+ LoadIC_PushArgs(masm);
+
+ // Perform tail call to the entry.
+ __ TailCallRuntime(Runtime::kKeyedGetOwnProperty, 2, 1);
+}
+
+
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
// Return address is on the stack.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698