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 4232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4243 | 4243 |
4244 | 4244 |
4245 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, | 4245 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, |
4246 intptr_t stack_pointer, | 4246 intptr_t stack_pointer, |
4247 Isolate* isolate) { | 4247 Isolate* isolate) { |
4248 FunctionEntryHook entry_hook = isolate->function_entry_hook(); | 4248 FunctionEntryHook entry_hook = isolate->function_entry_hook(); |
4249 DCHECK(entry_hook != NULL); | 4249 DCHECK(entry_hook != NULL); |
4250 entry_hook(function, stack_pointer); | 4250 entry_hook(function, stack_pointer); |
4251 } | 4251 } |
4252 | 4252 |
4253 void ArrayNoArgumentConstructorStub::GenerateAssembly( | |
4254 CodeStubAssembler* assembler) const { | |
4255 typedef compiler::Node Node; | |
4256 Node* native_context = assembler->LoadObjectField(assembler->Parameter(0), | |
mvstanton
2016/05/02 12:40:08
It would be better if the interface descriptor has
danno
2016/05/02 15:26:21
Done.
| |
4257 JSFunction::kContextOffset); | |
4258 bool track_allocation_site = | |
4259 AllocationSite::GetMode(elements_kind()) == TRACK_ALLOCATION_SITE && | |
4260 override_mode() != DISABLE_ALLOCATION_SITES; | |
4261 Node* allocation_site = | |
4262 track_allocation_site ? assembler->Parameter(1) : nullptr; | |
4263 Node* array = assembler->AllocateJSArray(elements_kind(), native_context, | |
4264 JSArray::kPreallocatedArrayElements, | |
4265 0, allocation_site); | |
4266 assembler->Return(array); | |
4267 } | |
4253 | 4268 |
4254 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 4269 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
4255 : PlatformCodeStub(isolate) { | 4270 : PlatformCodeStub(isolate) { |
4256 minor_key_ = ArgumentCountBits::encode(ANY); | 4271 minor_key_ = ArgumentCountBits::encode(ANY); |
4257 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 4272 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
4258 } | 4273 } |
4259 | 4274 |
4260 | 4275 |
4261 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate, | 4276 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate, |
4262 int argument_count) | 4277 int argument_count) |
(...skipping 29 matching lines...) Expand all Loading... | |
4292 if (type->Is(Type::UntaggedPointer())) { | 4307 if (type->Is(Type::UntaggedPointer())) { |
4293 return Representation::External(); | 4308 return Representation::External(); |
4294 } | 4309 } |
4295 | 4310 |
4296 DCHECK(!type->Is(Type::Untagged())); | 4311 DCHECK(!type->Is(Type::Untagged())); |
4297 return Representation::Tagged(); | 4312 return Representation::Tagged(); |
4298 } | 4313 } |
4299 | 4314 |
4300 } // namespace internal | 4315 } // namespace internal |
4301 } // namespace v8 | 4316 } // namespace v8 |
OLD | NEW |