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

Side by Side Diff: src/builtins/builtins-sharedarraybuffer.cc

Issue 2303793002: Revert of [stubs] Port KeyedLoadIC_Generic stub to TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/code-factory.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 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/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 a->Bind(&done); 134 a->Bind(&done);
135 return var_result.value(); 135 return var_result.value();
136 } 136 }
137 137
138 void ValidateAtomicIndex(CodeStubAssembler* a, compiler::Node* index_word, 138 void ValidateAtomicIndex(CodeStubAssembler* a, compiler::Node* index_word,
139 compiler::Node* array_length_word, 139 compiler::Node* array_length_word,
140 compiler::Node* context) { 140 compiler::Node* context) {
141 using namespace compiler; 141 using namespace compiler;
142 // Check if the index is in bounds. If not, throw RangeError. 142 // Check if the index is in bounds. If not, throw RangeError.
143 CodeStubAssembler::Label if_inbounds(a), if_notinbounds(a); 143 CodeStubAssembler::Label if_inbounds(a), if_notinbounds(a);
144 // TODO(jkummerow): Use unsigned comparison instead of "i<0 || i>length".
145 a->Branch( 144 a->Branch(
146 a->WordOr(a->Int32LessThan(index_word, a->Int32Constant(0)), 145 a->WordOr(a->Int32LessThan(index_word, a->Int32Constant(0)),
147 a->Int32GreaterThanOrEqual(index_word, array_length_word)), 146 a->Int32GreaterThanOrEqual(index_word, array_length_word)),
148 &if_notinbounds, &if_inbounds); 147 &if_notinbounds, &if_inbounds);
149 a->Bind(&if_notinbounds); 148 a->Bind(&if_notinbounds);
150 a->Return( 149 a->Return(
151 a->CallRuntime(Runtime::kThrowInvalidAtomicAccessIndexError, context)); 150 a->CallRuntime(Runtime::kThrowInvalidAtomicAccessIndexError, context));
152 a->Bind(&if_inbounds); 151 a->Bind(&if_inbounds);
153 } 152 }
154 153
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 a->WordShl(index_word, 2), value_word32); 257 a->WordShl(index_word, 2), value_word32);
259 a->Return(value_integer); 258 a->Return(value_integer);
260 259
261 // This shouldn't happen, we've already validated the type. 260 // This shouldn't happen, we've already validated the type.
262 a->Bind(&other); 261 a->Bind(&other);
263 a->Return(a->Int32Constant(0)); 262 a->Return(a->Int32Constant(0));
264 } 263 }
265 264
266 } // namespace internal 265 } // namespace internal
267 } // namespace v8 266 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/code-factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698