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

Side by Side Diff: src/ic/ic-compiler.cc

Issue 1612323003: Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: one more DCHECK fix Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/ic/ic.cc ('k') | src/interpreter/bytecode-array-iterator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic-compiler.h" 5 #include "src/ic/ic-compiler.h"
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 #include "src/ic/ic-inl.h" 8 #include "src/ic/ic-inl.h"
9 #include "src/profiler/cpu-profiler.h" 9 #include "src/profiler/cpu-profiler.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // No need to check for an elements-free prototype chain here, the generated 42 // No need to check for an elements-free prototype chain here, the generated
43 // stub code needs to check that dynamically anyway. 43 // stub code needs to check that dynamically anyway.
44 bool convert_hole_to_undefined = 44 bool convert_hole_to_undefined =
45 is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && 45 is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
46 *receiver_map == isolate->get_initial_js_array_map(elements_kind) && 46 *receiver_map == isolate->get_initial_js_array_map(elements_kind) &&
47 !(is_strong(LoadICState::GetLanguageMode(extra_ic_state))); 47 !(is_strong(LoadICState::GetLanguageMode(extra_ic_state)));
48 Handle<Code> stub; 48 Handle<Code> stub;
49 if (receiver_map->has_indexed_interceptor()) { 49 if (receiver_map->has_indexed_interceptor()) {
50 stub = LoadIndexedInterceptorStub(isolate).GetCode(); 50 stub = LoadIndexedInterceptorStub(isolate).GetCode();
51 } else if (receiver_map->IsStringMap()) { 51 } else if (receiver_map->IsStringMap()) {
52 // We have a string.
53 stub = LoadIndexedStringStub(isolate).GetCode(); 52 stub = LoadIndexedStringStub(isolate).GetCode();
54 } else if (receiver_map->has_sloppy_arguments_elements()) { 53 } else if (receiver_map->has_sloppy_arguments_elements()) {
55 stub = KeyedLoadSloppyArgumentsStub(isolate).GetCode(); 54 stub = KeyedLoadSloppyArgumentsStub(isolate).GetCode();
56 } else if (receiver_map->has_fast_elements() || 55 } else if (receiver_map->has_fast_elements() ||
57 receiver_map->has_fixed_typed_array_elements()) { 56 receiver_map->has_fixed_typed_array_elements()) {
58 stub = LoadFastElementStub(isolate, is_js_array, elements_kind, 57 stub = LoadFastElementStub(isolate, is_js_array, elements_kind,
59 convert_hole_to_undefined).GetCode(); 58 convert_hole_to_undefined).GetCode();
60 } else { 59 } else {
60 DCHECK(receiver_map->has_dictionary_elements());
61 stub = LoadDictionaryElementStub(isolate, LoadICState(extra_ic_state)) 61 stub = LoadDictionaryElementStub(isolate, LoadICState(extra_ic_state))
62 .GetCode(); 62 .GetCode();
63 } 63 }
64 return stub; 64 return stub;
65 } 65 }
66 66
67 67
68 Handle<Code> PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler( 68 Handle<Code> PropertyICCompiler::ComputeKeyedStoreMonomorphicHandler(
69 Handle<Map> receiver_map, LanguageMode language_mode, 69 Handle<Map> receiver_map, LanguageMode language_mode,
70 KeyedAccessStoreMode store_mode) { 70 KeyedAccessStoreMode store_mode) {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 309 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
310 310
311 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 311 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
312 } 312 }
313 313
314 314
315 #undef __ 315 #undef __
316 } // namespace internal 316 } // namespace internal
317 } // namespace v8 317 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/interpreter/bytecode-array-iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698