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

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

Issue 530343005: Clean up code stubs and ensure distinct major keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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/v8.h" 5 #include "src/v8.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/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 ElementsKind elements_kind = receiver_map->elements_kind(); 95 ElementsKind elements_kind = receiver_map->elements_kind();
96 Handle<Code> stub; 96 Handle<Code> stub;
97 if (receiver_map->has_fast_elements() || 97 if (receiver_map->has_fast_elements() ||
98 receiver_map->has_external_array_elements() || 98 receiver_map->has_external_array_elements() ||
99 receiver_map->has_fixed_typed_array_elements()) { 99 receiver_map->has_fixed_typed_array_elements()) {
100 stub = LoadFastElementStub(isolate, 100 stub = LoadFastElementStub(isolate,
101 receiver_map->instance_type() == JS_ARRAY_TYPE, 101 receiver_map->instance_type() == JS_ARRAY_TYPE,
102 elements_kind).GetCode(); 102 elements_kind).GetCode();
103 } else { 103 } else {
104 stub = FLAG_compiled_keyed_dictionary_loads 104 stub = LoadDictionaryElementStub(isolate).GetCode();
105 ? LoadDictionaryElementStub(isolate).GetCode()
106 : LoadDictionaryElementPlatformStub(isolate).GetCode();
107 } 105 }
108 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC); 106 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
109 Handle<Code> code = 107 Handle<Code> code =
110 compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate), stub, 108 compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate), stub,
111 isolate->factory()->empty_string(), ELEMENT); 109 isolate->factory()->empty_string(), ELEMENT);
112 110
113 Map::UpdateCodeCache(receiver_map, name, code); 111 Map::UpdateCodeCache(receiver_map, name, code);
114 return code; 112 return code;
115 } 113 }
116 114
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 444
447 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 445 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
448 446
449 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 447 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
450 } 448 }
451 449
452 450
453 #undef __ 451 #undef __
454 } 452 }
455 } // namespace v8::internal 453 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698