| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3236 | 3236 |
| 3237 assembler->Bind(&if_equal); | 3237 assembler->Bind(&if_equal); |
| 3238 assembler->Return(assembler->BooleanConstant(mode == kDontNegateResult)); | 3238 assembler->Return(assembler->BooleanConstant(mode == kDontNegateResult)); |
| 3239 | 3239 |
| 3240 assembler->Bind(&if_notequal); | 3240 assembler->Bind(&if_notequal); |
| 3241 assembler->Return(assembler->BooleanConstant(mode == kNegateResult)); | 3241 assembler->Return(assembler->BooleanConstant(mode == kNegateResult)); |
| 3242 } | 3242 } |
| 3243 | 3243 |
| 3244 } // namespace | 3244 } // namespace |
| 3245 | 3245 |
| 3246 void LoadApiGetterStub::GenerateAssembly( |
| 3247 compiler::CodeStubAssembler* assembler) const { |
| 3248 typedef compiler::Node Node; |
| 3249 Node* context = assembler->Parameter(3); |
| 3250 Node* receiver = assembler->Parameter(0); |
| 3251 // For now we only support receiver_is_holder. |
| 3252 DCHECK(receiver_is_holder()); |
| 3253 Node* holder = receiver; |
| 3254 Node* map = assembler->LoadMap(receiver); |
| 3255 Node* descriptors = assembler->LoadMapDescriptors(map); |
| 3256 Node* offset = |
| 3257 assembler->Int32Constant(DescriptorArray::ToValueIndex(index())); |
| 3258 Node* callback = |
| 3259 assembler->LoadFixedArrayElementInt32Index(descriptors, offset); |
| 3260 assembler->TailCallStub(CodeFactory::ApiGetter(isolate()), context, receiver, |
| 3261 holder, callback); |
| 3262 } |
| 3263 |
| 3246 void LessThanStub::GenerateAssembly( | 3264 void LessThanStub::GenerateAssembly( |
| 3247 compiler::CodeStubAssembler* assembler) const { | 3265 compiler::CodeStubAssembler* assembler) const { |
| 3248 GenerateAbstractRelationalComparison(assembler, kLessThan); | 3266 GenerateAbstractRelationalComparison(assembler, kLessThan); |
| 3249 } | 3267 } |
| 3250 | 3268 |
| 3251 void LessThanOrEqualStub::GenerateAssembly( | 3269 void LessThanOrEqualStub::GenerateAssembly( |
| 3252 compiler::CodeStubAssembler* assembler) const { | 3270 compiler::CodeStubAssembler* assembler) const { |
| 3253 GenerateAbstractRelationalComparison(assembler, kLessThanOrEqual); | 3271 GenerateAbstractRelationalComparison(assembler, kLessThanOrEqual); |
| 3254 } | 3272 } |
| 3255 | 3273 |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4122 if (type->Is(Type::UntaggedPointer())) { | 4140 if (type->Is(Type::UntaggedPointer())) { |
| 4123 return Representation::External(); | 4141 return Representation::External(); |
| 4124 } | 4142 } |
| 4125 | 4143 |
| 4126 DCHECK(!type->Is(Type::Untagged())); | 4144 DCHECK(!type->Is(Type::Untagged())); |
| 4127 return Representation::Tagged(); | 4145 return Representation::Tagged(); |
| 4128 } | 4146 } |
| 4129 | 4147 |
| 4130 } // namespace internal | 4148 } // namespace internal |
| 4131 } // namespace v8 | 4149 } // namespace v8 |
| OLD | NEW |