OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/accessor-assembler.h" | 5 #include "src/ic/accessor-assembler.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/counters.h" | 9 #include "src/counters.h" |
10 #include "src/ic/handler-configuration.h" | 10 #include "src/ic/handler-configuration.h" |
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2105 GenericElementLoad(receiver, receiver_map, instance_type, var_index.value(), | 2105 GenericElementLoad(receiver, receiver_map, instance_type, var_index.value(), |
2106 &slow); | 2106 &slow); |
2107 } | 2107 } |
2108 | 2108 |
2109 BIND(&if_unique_name); | 2109 BIND(&if_unique_name); |
2110 { | 2110 { |
2111 GenericPropertyLoad(receiver, receiver_map, instance_type, | 2111 GenericPropertyLoad(receiver, receiver_map, instance_type, |
2112 var_unique.value(), p, &slow); | 2112 var_unique.value(), p, &slow); |
2113 } | 2113 } |
2114 | 2114 |
2115 // TODO(jkummerow): The code below internalizes strings on the fly, but | |
2116 // it currently adds too much load on the stub cache. Find a solution | |
2117 // for stub cache overload issues and enable this! | |
2118 /* { | |
Igor Sheludko
2017/04/13 11:38:54
I'd suggest to add a read-only bool option and do
Jakob Kummerow
2017/04/13 14:01:52
Done.
| |
2119 Node* function = ExternalConstant( | |
2120 ExternalReference::try_internalize_string_function(isolate())); | |
2121 Node* result = CallCFunction1(MachineType::AnyTagged(), | |
2122 MachineType::AnyTagged(), function, p->name); | |
2123 // If internalization failed, then the string did not exist in the string | |
2124 // table yet, which implies that no existing object has a property with | |
2125 // that name. | |
2126 Label internalized(this), not_found(this); | |
2127 GotoIf(TaggedIsNotSmi(result), &internalized); | |
2128 Node* int_result = SmiUntag(result); | |
Igor Sheludko
2017/04/13 11:38:53
s/int_result/word_result/ ?
Jakob Kummerow
2017/04/13 14:01:52
Done.
| |
2129 GotoIf(WordEqual(int_result, IntPtrConstant(ResultSentinel::kNotFound)), | |
2130 ¬_found); | |
2131 GotoIf(WordEqual(int_result, IntPtrConstant(ResultSentinel::kUnsupported)), | |
2132 &slow); | |
2133 var_index.Bind(int_result); | |
2134 Goto(&if_index); | |
2135 | |
2136 BIND(&internalized); | |
2137 var_unique.Bind(result); | |
2138 Goto(&if_unique_name); | |
2139 | |
2140 BIND(¬_found); | |
2141 Return(UndefinedConstant()); | |
2142 } */ | |
2143 | |
2115 BIND(&slow); | 2144 BIND(&slow); |
2116 { | 2145 { |
2117 Comment("KeyedLoadGeneric_slow"); | 2146 Comment("KeyedLoadGeneric_slow"); |
2118 IncrementCounter(isolate()->counters()->ic_keyed_load_generic_slow(), 1); | 2147 IncrementCounter(isolate()->counters()->ic_keyed_load_generic_slow(), 1); |
2119 // TODO(jkummerow): Should we use the GetProperty TF stub instead? | 2148 // TODO(jkummerow): Should we use the GetProperty TF stub instead? |
2120 TailCallRuntime(Runtime::kKeyedGetProperty, p->context, p->receiver, | 2149 TailCallRuntime(Runtime::kKeyedGetProperty, p->context, p->receiver, |
2121 p->name); | 2150 p->name); |
2122 } | 2151 } |
2123 } | 2152 } |
2124 | 2153 |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2473 Node* context = Parameter(Descriptor::kContext); | 2502 Node* context = Parameter(Descriptor::kContext); |
2474 Node* vector = LoadFeedbackVectorForStub(); | 2503 Node* vector = LoadFeedbackVectorForStub(); |
2475 | 2504 |
2476 Callable callable = | 2505 Callable callable = |
2477 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode); | 2506 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode); |
2478 TailCallStub(callable, context, receiver, name, value, slot, vector); | 2507 TailCallStub(callable, context, receiver, name, value, slot, vector); |
2479 } | 2508 } |
2480 | 2509 |
2481 } // namespace internal | 2510 } // namespace internal |
2482 } // namespace v8 | 2511 } // namespace v8 |
OLD | NEW |