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

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

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic-inl.h » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/cpu-profiler.h" 7 #include "src/cpu-profiler.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/handler-compiler.h" 9 #include "src/ic/handler-compiler.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 Label* miss, 100 Label* miss,
101 ReturnHolder return_what) { 101 ReturnHolder return_what) {
102 PrototypeCheckType check_type = CHECK_ALL_MAPS; 102 PrototypeCheckType check_type = CHECK_ALL_MAPS;
103 int function_index = -1; 103 int function_index = -1;
104 if (map()->instance_type() < FIRST_NONSTRING_TYPE) { 104 if (map()->instance_type() < FIRST_NONSTRING_TYPE) {
105 function_index = Context::STRING_FUNCTION_INDEX; 105 function_index = Context::STRING_FUNCTION_INDEX;
106 } else if (map()->instance_type() == SYMBOL_TYPE) { 106 } else if (map()->instance_type() == SYMBOL_TYPE) {
107 function_index = Context::SYMBOL_FUNCTION_INDEX; 107 function_index = Context::SYMBOL_FUNCTION_INDEX;
108 } else if (map()->instance_type() == HEAP_NUMBER_TYPE) { 108 } else if (map()->instance_type() == HEAP_NUMBER_TYPE) {
109 function_index = Context::NUMBER_FUNCTION_INDEX; 109 function_index = Context::NUMBER_FUNCTION_INDEX;
110 } else if (map()->instance_type() == FLOAT32X4_TYPE) {
111 function_index = Context::FLOAT32X4_FUNCTION_INDEX;
112 } else if (map()->instance_type() == INT32X4_TYPE) {
113 function_index = Context::INT32X4_FUNCTION_INDEX;
114 } else if (map()->instance_type() == BOOL32X4_TYPE) {
115 function_index = Context::BOOL32X4_FUNCTION_INDEX;
116 } else if (map()->instance_type() == INT16X8_TYPE) {
117 function_index = Context::INT16X8_FUNCTION_INDEX;
118 } else if (map()->instance_type() == BOOL16X8_TYPE) {
119 function_index = Context::BOOL16X8_FUNCTION_INDEX;
120 } else if (map()->instance_type() == INT8X16_TYPE) {
121 function_index = Context::INT8X16_FUNCTION_INDEX;
122 } else if (map()->instance_type() == BOOL8X16_TYPE) {
123 function_index = Context::BOOL8X16_FUNCTION_INDEX;
124 } else if (*map() == isolate()->heap()->boolean_map()) { 110 } else if (*map() == isolate()->heap()->boolean_map()) {
125 function_index = Context::BOOLEAN_FUNCTION_INDEX; 111 function_index = Context::BOOLEAN_FUNCTION_INDEX;
112 // clang-format off
113 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
114 } else if (map().is_identical_to(isolate()->factory()->type##_map())) { \
115 function_index = Context::TYPE##_FUNCTION_INDEX;
116 SIMD128_TYPES(SIMD128_TYPE)
117 #undef SIMD128_TYPE
118 // clang-format on
126 } else { 119 } else {
127 check_type = SKIP_RECEIVER; 120 check_type = SKIP_RECEIVER;
128 } 121 }
129 122
130 if (check_type == CHECK_ALL_MAPS) { 123 if (check_type == CHECK_ALL_MAPS) {
131 GenerateDirectLoadGlobalFunctionPrototype(masm(), function_index, 124 GenerateDirectLoadGlobalFunctionPrototype(masm(), function_index,
132 scratch1(), miss); 125 scratch1(), miss);
133 Object* function = isolate()->native_context()->get(function_index); 126 Object* function = isolate()->native_context()->get(function_index);
134 Object* prototype = JSFunction::cast(function)->instance_prototype(); 127 Object* prototype = JSFunction::cast(function)->instance_prototype();
135 Handle<Map> map(JSObject::cast(prototype)->map()); 128 Handle<Map> map(JSObject::cast(prototype)->map());
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 : kNoExtraICState); 592 : kNoExtraICState);
600 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 593 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
601 } 594 }
602 } 595 }
603 596
604 handlers->Add(cached_stub); 597 handlers->Add(cached_stub);
605 } 598 }
606 } 599 }
607 } // namespace internal 600 } // namespace internal
608 } // namespace v8 601 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698