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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 compiler::CodeStubAssembler* assembler) const { | 2336 compiler::CodeStubAssembler* assembler) const { |
2337 typedef compiler::Node Node; | 2337 typedef compiler::Node Node; |
2338 Node* receiver = assembler->Parameter(0); | 2338 Node* receiver = assembler->Parameter(0); |
2339 Node* name = assembler->Parameter(1); | 2339 Node* name = assembler->Parameter(1); |
2340 Node* value = assembler->Parameter(2); | 2340 Node* value = assembler->Parameter(2); |
2341 Node* context = assembler->Parameter(3); | 2341 Node* context = assembler->Parameter(3); |
2342 assembler->TailCallRuntime(Runtime::kStorePropertyWithInterceptor, context, | 2342 assembler->TailCallRuntime(Runtime::kStorePropertyWithInterceptor, context, |
2343 receiver, name, value); | 2343 receiver, name, value); |
2344 } | 2344 } |
2345 | 2345 |
| 2346 void LoadIndexedInterceptorStub::GenerateAssembly( |
| 2347 compiler::CodeStubAssembler* assembler) const { |
| 2348 typedef compiler::Node Node; |
| 2349 typedef compiler::CodeStubAssembler::Label Label; |
| 2350 Node* receiver = assembler->Parameter(0); |
| 2351 Node* key = assembler->Parameter(1); |
| 2352 Node* slot = assembler->Parameter(2); |
| 2353 Node* vector = assembler->Parameter(3); |
| 2354 Node* context = assembler->Parameter(4); |
| 2355 |
| 2356 Label if_keyispositivesmi(assembler), if_keyisinvalid(assembler); |
| 2357 assembler->Branch(assembler->WordIsPositiveSmi(key), &if_keyispositivesmi, |
| 2358 &if_keyisinvalid); |
| 2359 assembler->Bind(&if_keyispositivesmi); |
| 2360 assembler->TailCallRuntime(Runtime::kLoadElementWithInterceptor, context, |
| 2361 receiver, key); |
| 2362 |
| 2363 assembler->Bind(&if_keyisinvalid); |
| 2364 assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, key, |
| 2365 slot, vector); |
| 2366 } |
| 2367 |
2346 template<class StateType> | 2368 template<class StateType> |
2347 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { | 2369 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { |
2348 // Note: Although a no-op transition is semantically OK, it is hinting at a | 2370 // Note: Although a no-op transition is semantically OK, it is hinting at a |
2349 // bug somewhere in our state transition machinery. | 2371 // bug somewhere in our state transition machinery. |
2350 DCHECK(from != to); | 2372 DCHECK(from != to); |
2351 if (!FLAG_trace_ic) return; | 2373 if (!FLAG_trace_ic) return; |
2352 OFStream os(stdout); | 2374 OFStream os(stdout); |
2353 os << "["; | 2375 os << "["; |
2354 PrintBaseName(os); | 2376 PrintBaseName(os); |
2355 os << ": " << from << "=>" << to << "]" << std::endl; | 2377 os << ": " << from << "=>" << to << "]" << std::endl; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2771 if (type->Is(Type::UntaggedPointer())) { | 2793 if (type->Is(Type::UntaggedPointer())) { |
2772 return Representation::External(); | 2794 return Representation::External(); |
2773 } | 2795 } |
2774 | 2796 |
2775 DCHECK(!type->Is(Type::Untagged())); | 2797 DCHECK(!type->Is(Type::Untagged())); |
2776 return Representation::Tagged(); | 2798 return Representation::Tagged(); |
2777 } | 2799 } |
2778 | 2800 |
2779 } // namespace internal | 2801 } // namespace internal |
2780 } // namespace v8 | 2802 } // namespace v8 |
OLD | NEW |